diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d4f872ac..7f291efc 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: a78f35a2-6d8d-4b9f-8962-89b8103f2924 management: - docChecksum: 38730339aa1da77855e86c169896f12f + docChecksum: ed2fd953cba3e99fb81365252925a0d4 docVersion: 1.1.0 speakeasyVersion: internal generationVersion: internal - releaseVersion: 3.1.1 - configChecksum: 6d84855e7fac71cdbcc700bbc8102e87 + releaseVersion: 3.2.0 + configChecksum: 0d197436b8968818862fd1ec6291022b repoURL: https://github.com/moderation-api/sdk-ruby installationURL: https://github.com/moderation-api/sdk-ruby published: true @@ -38,7 +38,7 @@ trackedFiles: Gemfile: last_write_checksum: sha1:8c1b6fa9505f61abd0fb6741f8094e9655a55495 Gemfile.lock: - last_write_checksum: sha1:f506e56bb9f5f60261e76361a78ccd3239079288 + last_write_checksum: sha1:2c3d61f3767431df09409eb83c03b5d10688ab22 Rakefile: last_write_checksum: sha1:c572639efdae8c7b24141ee5c02d8f009e101ed8 USAGE.md: @@ -46,7 +46,7 @@ trackedFiles: docs/models/components/authenticationerrorcode.md: last_write_checksum: sha1:ab6bc60a32b0b9ee2508c85248f5fe17162e2fc2 docs/models/components/badrequesterrorcode.md: - last_write_checksum: sha1:f0eb9e75043798b942f88622ede2a0b09f12727d + last_write_checksum: sha1:e536a31dc670254aa6d2df777cff3d50b4c605d9 docs/models/components/block.md: last_write_checksum: sha1:85e7f9959076166397c429e3ad1b86f11e5f84e0 docs/models/components/channel.md: @@ -61,12 +61,14 @@ trackedFiles: last_write_checksum: sha1:abb0c500f072724746e12e5c557d035e6b576027 docs/models/components/internalservererrorcode.md: last_write_checksum: sha1:031c63169ea388775fab899e4aa90f2fd8331d8b + docs/models/components/label.md: + last_write_checksum: sha1:11856a145bb7476b67c1397fab31168a9e273352 docs/models/components/metadata.md: last_write_checksum: sha1:5bf679a558962d1ddb75c1afa8f4a8d92a7dc515 docs/models/components/metrics.md: last_write_checksum: sha1:b7851dce28f3aabae46767561365170ca4394c1e docs/models/components/notfounderrorcode.md: - last_write_checksum: sha1:03545f4ad46db87f02bc362fc9d2d1ca9ae1d622 + last_write_checksum: sha1:40d61bd23dfa72023473cbb03e482c8f2a207fb5 docs/models/components/pagination.md: last_write_checksum: sha1:a9340a257728523afd5c40ec657c125d9d81b9cd docs/models/components/path.md: @@ -75,6 +77,8 @@ trackedFiles: last_write_checksum: sha1:c55f494d299483ea9dce99df0eddff34152d61a4 docs/models/components/project.md: last_write_checksum: sha1:546b2ac41dbbaa231c9425edfd4ab5d1b7ae422b + docs/models/components/projectapikey.md: + last_write_checksum: sha1:3f415ce7e1da4c5d1dbd97dd91d7197a649d0c48 docs/models/components/projectglobalflaggingmode.md: last_write_checksum: sha1:072fd976ac8ec5889d5ad0409030afd9096cb2d6 docs/models/components/projectwithkey.md: @@ -82,15 +86,51 @@ trackedFiles: docs/models/components/projectwithkeyglobalflaggingmode.md: last_write_checksum: sha1:e2da953b289723d0bde8b2dea53ae3522bb5b9d8 docs/models/components/publicauthor.md: - last_write_checksum: sha1:de2dfdaf8f6a8b188b5178fc8854e9a1a47dc25c + last_write_checksum: sha1:92ad10f90cf40cfc2d1e7d7cc9ff47d8f9055463 + docs/models/components/publicauthorstatus.md: + last_write_checksum: sha1:24851d3d81401bf21f950d2ea1dd72a1001591fa + docs/models/components/queue.md: + last_write_checksum: sha1:ac8d8af0be1ed160bd0c98c11003b4dff0627a7e + docs/models/components/queueitem.md: + last_write_checksum: sha1:84306866c0ef4edcf218f0c51fc7215662bcbad7 + docs/models/components/queueitemaudio.md: + last_write_checksum: sha1:ae2eba19682e61cc960d7b94951d8199dea73ed6 + docs/models/components/queueitembrandimpersonation.md: + last_write_checksum: sha1:1a34e23e3447fd0d60382357327498338d2e2e7a + docs/models/components/queueitemcontent.md: + last_write_checksum: sha1:6b51323d865a13456595d3e685ddd154bb99d127 + docs/models/components/queueitemcontentleaf.md: + last_write_checksum: sha1:d4b4ade95beac516508e038debdd0a24735cb50a + docs/models/components/queueitemcontentleafaudio.md: + last_write_checksum: sha1:aa94faafb8e3f334f964a599d49a77507dcbba98 + docs/models/components/queueitemcontentleafimage.md: + last_write_checksum: sha1:8cab1cc70b6a25f344aa3c139883c6ccaaea33e8 + docs/models/components/queueitemcontentleaftext.md: + last_write_checksum: sha1:61edebe2779128e59ab7454fccdd4429e9fda820 + docs/models/components/queueitemcontentleafvideo.md: + last_write_checksum: sha1:71747efcdcdf1b3cb918fc25755947bf5b089b18 + docs/models/components/queueitemimage.md: + last_write_checksum: sha1:a353106d8accb6e013b96f6d84b78566c917990b + docs/models/components/queueitemmatch.md: + last_write_checksum: sha1:f6830611e725c4d9ee66078b68d4a4938ba670cf + docs/models/components/queueitemobject.md: + last_write_checksum: sha1:fae1d48e287bbd3175823bfa3851d39c9e22ed0b + docs/models/components/queueitemsignals.md: + last_write_checksum: sha1:6dabace9ec1f5e80090e1b3a489c154aab75f4c1 + docs/models/components/queueitemstatus.md: + last_write_checksum: sha1:f44301be9411e9234ab4588bb55ece6f36fceaa6 + docs/models/components/queueitemtext.md: + last_write_checksum: sha1:e24dec44b90bebfae8c4b8913f598e3bf2e7fca5 + docs/models/components/queueitemvideo.md: + last_write_checksum: sha1:abb8577145408c7cfde5c1d7679865ab5f4d85d7 + docs/models/components/queuewithcounts.md: + last_write_checksum: sha1:1c42f6455d9eb66626b63fcc5a50075388b758b9 docs/models/components/ratelimiterrorcode.md: last_write_checksum: sha1:1e7c3a8aae271305b65271d83a0d35d1dd93831a docs/models/components/riskevaluation.md: last_write_checksum: sha1:c70b8d771bbc119c34e4784dcdea08f3b51a0b0c docs/models/components/security.md: last_write_checksum: sha1:91811992aef9c358acbff5bf8db52e478fea54c4 - docs/models/components/status.md: - last_write_checksum: sha1:5a61898f1a4ec4e66678f0e58a53e62298671d62 docs/models/components/transcriptionquality.md: last_write_checksum: sha1:dccb6e147867859bb55ca89d8be8b2c6a451d844 docs/models/components/trustlevel.md: @@ -98,23 +138,23 @@ trackedFiles: docs/models/errors/authenticationerror.md: last_write_checksum: sha1:e665b3ccf19b24995501bef53595800c18b0be1b docs/models/errors/badrequesterror.md: - last_write_checksum: sha1:2c07c6230e69b001c23eb6cc3287811c3aac31c9 + last_write_checksum: sha1:92586c1bdd689f485d3d12fc050530fafe03337e docs/models/errors/conflicterror.md: last_write_checksum: sha1:21019744a14180a109cbd78fb4e3089bcca9c79c docs/models/errors/internalservererror.md: last_write_checksum: sha1:cddad91cd59742b52b48d3eba382b4fe093e6ac2 docs/models/errors/notfounderror.md: - last_write_checksum: sha1:a3bccac304cb8f1441443df778cf3ed9d8fa72ce + last_write_checksum: sha1:ea7e4e0ed219c1c3c18c7eb58aaf83a760dc54f2 docs/models/errors/permissiondeniederror.md: last_write_checksum: sha1:1c9f0f5443b8faeed3b6501b8e1eab335fe0514d docs/models/errors/ratelimiterror.md: last_write_checksum: sha1:1d8b6a1512a9df27fe36a1b613b459d65c4ff1cb docs/models/operations/actionrequest.md: last_write_checksum: sha1:14b53454f17b5f8c3262ac9486eadfec17601689 - docs/models/operations/actionstat.md: - last_write_checksum: sha1:f188e87a8fa8cae052d60d784c316942c7fdb75b + docs/models/operations/actionresponse.md: + last_write_checksum: sha1:e82a16b5976e4bf76f42361b5b09618793b661dc docs/models/operations/addwordlistwordsrequest.md: - last_write_checksum: sha1:f6f1d0181d8009571df899966c9b93a9d16ac1ac + last_write_checksum: sha1:5eda53e8b6a5c9a56a74c4be9f71ff9ae6b1540b docs/models/operations/addwordlistwordsrequestbody.md: last_write_checksum: sha1:ba31b2426a81f08bb6484ef0cacb405e62dccfd1 docs/models/operations/addwordlistwordsresponse.md: @@ -129,8 +169,6 @@ trackedFiles: last_write_checksum: sha1:a6eae479403113a3826b970f5623555a1e5ecbe7 docs/models/operations/audioresponse.md: last_write_checksum: sha1:9bcb66a88e7a0430f9b87e1539e497dc9b26ff0f - docs/models/operations/author.md: - last_write_checksum: sha1:34c8bc05eed5c8b718cf47fa77332c77532dab46 docs/models/operations/authorstatus.md: last_write_checksum: sha1:31fe1baf7eb645c33275dc87a88af5d735a47666 docs/models/operations/behavior.md: @@ -139,20 +177,18 @@ trackedFiles: last_write_checksum: sha1:85e7f9959076166397c429e3ad1b86f11e5f84e0 docs/models/operations/brandimpersonation.md: last_write_checksum: sha1:d499d8bbab4a265e56c70f2029d7abb956f44246 + docs/models/operations/bucket.md: + last_write_checksum: sha1:f4720785b0756ef7edd973d127b6d824fcdade58 docs/models/operations/cannabis.md: last_write_checksum: sha1:3869c8bf66fe39e251d985b85c17ec842177b358 docs/models/operations/casebook.md: last_write_checksum: sha1:f41b33e4274f6aad45c5213bb5694cf158b43faa - docs/models/operations/casebookagreement.md: - last_write_checksum: sha1:d5d446e1b2efad41991122d3fa7b5c90b7f55450 - docs/models/operations/casebookanswer.md: - last_write_checksum: sha1:0af1fef9b173d5fab843ec33e29c9d37e5b44b7f + docs/models/operations/channel.md: + last_write_checksum: sha1:2c7d470001c887f4c7cc4cca1a75f91696751e2d docs/models/operations/channelcircumvention.md: last_write_checksum: sha1:ed22af55ded3adf091f258aea8e682ff5fe849c9 - docs/models/operations/checkstatus.md: - last_write_checksum: sha1:ec088712c744159e362f4fe4470351867538238d docs/models/operations/classifieroutput.md: - last_write_checksum: sha1:3b9861cf004b2f481ef19a480884ce63936d031e + last_write_checksum: sha1:9da80650ffde084a824d88524e0a6d8736436381 docs/models/operations/clientaction.md: last_write_checksum: sha1:e86547969120ea8bdf2046c9f50fee42cfc042b8 docs/models/operations/codeabuse.md: @@ -182,7 +218,7 @@ trackedFiles: docs/models/operations/createactionqueuebehaviourresponse.md: last_write_checksum: sha1:a4655369b37d81aa27fa502f46bda8100fddf3f6 docs/models/operations/createactionrequest.md: - last_write_checksum: sha1:7743448a5916c85b0d789929df7d271b275ab6c7 + last_write_checksum: sha1:c5e3d0cc13f0cd03a3a364626ecebb36c14bfcea docs/models/operations/createactionrequestbody.md: last_write_checksum: sha1:1516597659e6b1e55b319adc80b42c4cc0f7872c docs/models/operations/createactionresponse.md: @@ -196,7 +232,7 @@ trackedFiles: docs/models/operations/createauthormetadata.md: last_write_checksum: sha1:cd50f9487a224d86aa8236fc9bf2bbe64b5dc3eb docs/models/operations/createauthorrequest.md: - last_write_checksum: sha1:9fb933fefebfb642140a3ceadaaf0623b56d4195 + last_write_checksum: sha1:55193ec6225dd02497478de3c6567eb2439ba995 docs/models/operations/createauthorrequestbody.md: last_write_checksum: sha1:4b73a4bda1a3cb251241c794f37657100bbacd26 docs/models/operations/createauthorresponse.md: @@ -209,6 +245,22 @@ trackedFiles: last_write_checksum: sha1:4f27fceca461554eb4429af95e5cb2af46ea418e docs/models/operations/createchannelresponse.md: last_write_checksum: sha1:62d430484b466ee342586cdb6a44824fbb9611aa + docs/models/operations/createfeedbackrequest.md: + last_write_checksum: sha1:61fc8c0472350d0fcfd1651eb2fa98925baf12e1 + docs/models/operations/createfeedbackrequestbody.md: + last_write_checksum: sha1:133b33200bc7552abbdbedbe6938d8b4ee8d6f2d + docs/models/operations/createfeedbackresponse.md: + last_write_checksum: sha1:1826cbc4b661df2296df421b9280694ee3deb15b + docs/models/operations/createfeedbackresponsebody.md: + last_write_checksum: sha1:9cd7dd5f0eb0f8b74372233f1d9a1cf8c8f488ea + docs/models/operations/createfeedbacktype.md: + last_write_checksum: sha1:efe7aa866188ebfb8a1d7f691c5ee8ae3015efb8 + docs/models/operations/createprojectapikeyrequest.md: + last_write_checksum: sha1:0178ae17fe78bac738f99a8eaf576eee178703e5 + docs/models/operations/createprojectapikeyrequestbody.md: + last_write_checksum: sha1:a8066a3128577ca17fc01aed26f50fae623b434d + docs/models/operations/createprojectapikeyresponse.md: + last_write_checksum: sha1:beaa6acb0216230bf246b6795140abc88e7c3a01 docs/models/operations/createprojectrequest.md: last_write_checksum: sha1:4f6ebbef85afce45111483ac7257c3e60b6e421e docs/models/operations/createprojectresponse.md: @@ -220,13 +272,21 @@ trackedFiles: docs/models/operations/createwebhookpayloadversion.md: last_write_checksum: sha1:aae6bb9390f85bbafb6196605c4cf558923a59ac docs/models/operations/createwebhookrequest.md: - last_write_checksum: sha1:5dac547f31659bc1973b60b327558f101dd3d55f + last_write_checksum: sha1:c8f503a588b1d0d52e24cd1302715ba665b1df0f docs/models/operations/createwebhookrequestbody.md: last_write_checksum: sha1:9ae7470fcb6826673d743cab2f1bad6270c84f82 docs/models/operations/createwebhookresponse.md: last_write_checksum: sha1:a5b8d09529cf528175f605fe5040193a348db0ee docs/models/operations/createwebhookresponsebody.md: last_write_checksum: sha1:be6bbb84266477b45c41e203d652f611fb7aec8f + docs/models/operations/createwordlistrequest.md: + last_write_checksum: sha1:6c85b09dfa2fbfbb5e926ef82bab8386f0ccb57e + docs/models/operations/createwordlistrequestbody.md: + last_write_checksum: sha1:adc8d841d19ddffbcc95cd16fcc489999b518d62 + docs/models/operations/createwordlistresponse.md: + last_write_checksum: sha1:fc69ff499a559020275480a6806d07ea35aaea63 + docs/models/operations/createwordlistresponsebody.md: + last_write_checksum: sha1:4ec7dccd8ee3c2869e3cbb495a72626592cc3e57 docs/models/operations/crypto.md: last_write_checksum: sha1:2a8703d11bdf8c727645ba1b0e1c1b00f5a6ceb7 docs/models/operations/curiosityinsight.md: @@ -234,7 +294,7 @@ trackedFiles: docs/models/operations/currentproject.md: last_write_checksum: sha1:70bc5ec434483d935cddd88b235d79db280241b2 docs/models/operations/dailyreviewcount.md: - last_write_checksum: sha1:ff25cc15027ff36a77dc8608856533e3674a5015 + last_write_checksum: sha1:41c8014d842aad960e1290b9fae3cb3fe60e0ce2 docs/models/operations/dataaudio.md: last_write_checksum: sha1:c98812853e479273cf292084c9bc6dbf124ecee7 docs/models/operations/dataimage.md: @@ -244,13 +304,13 @@ trackedFiles: docs/models/operations/datavideo.md: last_write_checksum: sha1:8ca3c16b6d36c67adda213bfe9fa68a0c05b027a docs/models/operations/deleteactionrequest.md: - last_write_checksum: sha1:09aed25fa0803ccd1a2200781f411ff3b60fd300 + last_write_checksum: sha1:a3993e63b4fa3f04e0f86c5339fa41b3bccd3001 docs/models/operations/deleteactionresponse.md: last_write_checksum: sha1:c6e16fae8cc555eae48242534b93b7350c10c93e docs/models/operations/deleteactionresponsebody.md: last_write_checksum: sha1:51b002f6e472af8731cd199c5c8970625b3ba21c docs/models/operations/deleteauthorrequest.md: - last_write_checksum: sha1:2f64761a88283063e8ab342e70c031fbb143625f + last_write_checksum: sha1:3f967fabb1cf0caa05cca7e460c8ee4d2bcfafcc docs/models/operations/deleteauthorresponse.md: last_write_checksum: sha1:5d3c8e9f23ed73b9ee1ce64eaebca94bd9e8ef5e docs/models/operations/deleteauthorresponsebody.md: @@ -268,7 +328,7 @@ trackedFiles: docs/models/operations/deleteprojectresponsebody.md: last_write_checksum: sha1:277d4123ad842747896f48dbbc0dddad1faa5873 docs/models/operations/deletewebhookrequest.md: - last_write_checksum: sha1:baf3ccb3b469723f9dae5c8d22164643a61b3735 + last_write_checksum: sha1:d52cadeb64a319379dc51b602296c66214669345 docs/models/operations/deletewebhookresponse.md: last_write_checksum: sha1:710b4cf0e9c349d8477ddc7e2e9816104dd8dccf docs/models/operations/deletewebhookresponsebody.md: @@ -298,7 +358,7 @@ trackedFiles: docs/models/operations/evaluation.md: last_write_checksum: sha1:eb47f434922dfc46bb6e4fb408e67b2fb7a99ab2 docs/models/operations/executeactionrequest.md: - last_write_checksum: sha1:d61b0cb8cb5a072145631bcdc669928079486cb7 + last_write_checksum: sha1:e3e8882f31cf89a48dfc71153757dd9dc5f7f3c5 docs/models/operations/executeactionrequestbody.md: last_write_checksum: sha1:f5f76dfd308978b06c0afbaa7fcc71ab9f6b98cc docs/models/operations/executeactionresponse.md: @@ -309,18 +369,14 @@ trackedFiles: last_write_checksum: sha1:c8bbe7bd88b521e2a3a9a9e5f3bdf31eef267418 docs/models/operations/facedetection.md: last_write_checksum: sha1:7770141d57abe6bbeecc61fd769c16bb216769ee - docs/models/operations/filter.md: - last_write_checksum: sha1:5954a52cdd7d4533c1435b68b74a6a18aed09cda - docs/models/operations/filterlabel.md: - last_write_checksum: sha1:4b8eefda9b08a377dc50e97e02e80f42f345e166 - docs/models/operations/flaggedcontenttrend.md: - last_write_checksum: sha1:41f4eec3d41152cfa5927997f3d89ee5f925a80b docs/models/operations/flaggingmode.md: last_write_checksum: sha1:3733a02c68813acfa9c645a3675867473b079129 + docs/models/operations/flagratespike.md: + last_write_checksum: sha1:b7bcd90d947b8fa3b263c05b434ef87ddfb69459 docs/models/operations/gambling.md: last_write_checksum: sha1:ebc6c39238132eae65e501f2cb48aa64c3e4c7b8 docs/models/operations/getaccountrequest.md: - last_write_checksum: sha1:f5f2db556a4e58b12d986abfa4af8ae0a0cb1d6d + last_write_checksum: sha1:7e0833951bf6c2cd428c5106d2f115294896612f docs/models/operations/getaccountresponse.md: last_write_checksum: sha1:fd3ffbb9ee36b3dd4d0019db44b9eb9fc0c5cda0 docs/models/operations/getaccountresponsebody.md: @@ -332,15 +388,79 @@ trackedFiles: docs/models/operations/getactionqueuebehaviour.md: last_write_checksum: sha1:932ba354f0755a846d65e07e92974bf2e9e2d81d docs/models/operations/getactionrequest.md: - last_write_checksum: sha1:f8c17199401ab9cd4dbfa9f930c9d6179870343d + last_write_checksum: sha1:7ff1552917b206940672df030aef2e90195b1d97 docs/models/operations/getactionresponse.md: last_write_checksum: sha1:42381e7a7d68b3ef8bdf0bb56f1d6a7e53664813 docs/models/operations/getactionresponsebody.md: last_write_checksum: sha1:52060b4554e895939f3614732b4294c3c81fb384 docs/models/operations/getactiontype.md: last_write_checksum: sha1:454036f9132b409bc60bba6041b195bbc36551ca + docs/models/operations/getanalyticsauthorsauthor.md: + last_write_checksum: sha1:89143df8cd733319a80a9ea75d263ddbf6014351 + docs/models/operations/getanalyticsauthorsqueryparamrange.md: + last_write_checksum: sha1:b65833a6f4ec5c370fb674348adc18f5a1e36a01 + docs/models/operations/getanalyticsauthorsrangeresponse.md: + last_write_checksum: sha1:4b6008cbbe3ec0cf9e2c0ad0496d1ad52ef22b35 + docs/models/operations/getanalyticsauthorsrequest.md: + last_write_checksum: sha1:23c090badcc12af0523da7accec306ee3cfc5cbd + docs/models/operations/getanalyticsauthorsresponse.md: + last_write_checksum: sha1:eeb0ed6d0d26aed5ffc1abdcafd4efa32e001b13 + docs/models/operations/getanalyticsauthorsresponsebody.md: + last_write_checksum: sha1:e89f3c51cfc96356401597b5b6fe27b0e4301d79 + docs/models/operations/getanalyticsautomationqueryparamrange.md: + last_write_checksum: sha1:6b579c55c74844af6773b1055f7fb8f03b59c005 + docs/models/operations/getanalyticsautomationrangeresponse.md: + last_write_checksum: sha1:10dac7582486074239b1fcc4a2192dd139ae19bc + docs/models/operations/getanalyticsautomationrequest.md: + last_write_checksum: sha1:5451cfe7c5ce15f43b34220b536789da47fab9d3 + docs/models/operations/getanalyticsautomationresponse.md: + last_write_checksum: sha1:b648e37bd6d7df08a3e3828977600a61fa1b3e7f + docs/models/operations/getanalyticsautomationresponsebody.md: + last_write_checksum: sha1:af4c43d6162c118d10ff9eabd5267cb7d3cb66a5 + docs/models/operations/getanalyticschannelsqueryparamrange.md: + last_write_checksum: sha1:b934b8d5517f1d10535d9dbf3d3237bae518062a + docs/models/operations/getanalyticschannelsrangeresponse.md: + last_write_checksum: sha1:ff0bb0e7be84e2cb4b7aba3c431555c7f86d4a44 + docs/models/operations/getanalyticschannelsrequest.md: + last_write_checksum: sha1:afdd4f6096755d087c657896e6d4e12946a37228 + docs/models/operations/getanalyticschannelsresponse.md: + last_write_checksum: sha1:7b6f1835a0efa862d399835e859fe798e783ad3f + docs/models/operations/getanalyticschannelsresponsebody.md: + last_write_checksum: sha1:4d13eed442ef8cd241634664b1879e9802537847 + docs/models/operations/getanalyticspoliciespolicy.md: + last_write_checksum: sha1:45b0f1b1b8fdda2ee0a75bacd80640100c811577 + docs/models/operations/getanalyticspoliciesqueryparamrange.md: + last_write_checksum: sha1:c84634f2f59868752271ee8f12397da1121c0f44 + docs/models/operations/getanalyticspoliciesrangeresponse.md: + last_write_checksum: sha1:bc9b3651774d49ac4fb11b658a624f05843f74d4 + docs/models/operations/getanalyticspoliciesrequest.md: + last_write_checksum: sha1:6fa78db8618c57f19261cdddee2088b78a6783b7 + docs/models/operations/getanalyticspoliciesresponse.md: + last_write_checksum: sha1:df32eee6f4d123e2535c29276d12ee207be71f84 + docs/models/operations/getanalyticspoliciesresponsebody.md: + last_write_checksum: sha1:ebdc35eccb29750352d2814149bbd5b45bb6180b + docs/models/operations/getanalyticssummaryqueryparamrange.md: + last_write_checksum: sha1:a54af197be50fe786ca01138dded19d3395a8b58 + docs/models/operations/getanalyticssummaryrangeresponse.md: + last_write_checksum: sha1:0729ffef8c47c2948085a1626e1944bcb9ce680b + docs/models/operations/getanalyticssummaryrequest.md: + last_write_checksum: sha1:b5e0497b8002d9b76c4ee8010cfdee42c54c330d + docs/models/operations/getanalyticssummaryresponse.md: + last_write_checksum: sha1:1d46f987fe56459f9ef4d648eeaa70c9aa3f8b98 + docs/models/operations/getanalyticssummaryresponsebody.md: + last_write_checksum: sha1:ccdcbcedba84b5331c9c310a0605320c3e845c50 + docs/models/operations/getanalyticsvolumesqueryparamrange.md: + last_write_checksum: sha1:a86a3675a50ba612f8d19d7f8e973d6791cd13ea + docs/models/operations/getanalyticsvolumesrangeresponse.md: + last_write_checksum: sha1:9bddc62390aca9a09b78d6e9f27a634162475672 + docs/models/operations/getanalyticsvolumesrequest.md: + last_write_checksum: sha1:a7bc8e5a964fa0be734dd3fc32ce277c03ba37b5 + docs/models/operations/getanalyticsvolumesresponse.md: + last_write_checksum: sha1:b612a3e8e903fa5f5d0938421d74828f151d2145 + docs/models/operations/getanalyticsvolumesresponsebody.md: + last_write_checksum: sha1:cf2e0220ed40b9c10a2aac582c9807667c0fe78c docs/models/operations/getauthorrequest.md: - last_write_checksum: sha1:5899cc7b22eb87c11981f72a5c670b0b3253ff2d + last_write_checksum: sha1:40e31e51585af72445eb9296c769aa4917939a92 docs/models/operations/getauthorresponse.md: last_write_checksum: sha1:15e8a7b14a3e9964cc48fd4a42982fef8d3dd4ec docs/models/operations/getchannelrequest.md: @@ -351,48 +471,42 @@ trackedFiles: last_write_checksum: sha1:d59ca74a19e64b6662757f630c103db4c18b055d docs/models/operations/getprojectresponse.md: last_write_checksum: sha1:d46ea65f2c84f2ef8dbf315a1bfbac58004170b8 - docs/models/operations/getqueuecontenttype.md: - last_write_checksum: sha1:3338d4fc7876ad2958b60571b5a562e5481a7740 - docs/models/operations/getqueuerecommendationaction.md: - last_write_checksum: sha1:c548382ffde40a84cd230bfee0bedf80e04f9ab9 docs/models/operations/getqueuerequest.md: - last_write_checksum: sha1:5a1db94bbd3a08a7fe62bfacb1c5149c2c6915db + last_write_checksum: sha1:377d67c89073c2ca1d8105a49faabe245bb37392 docs/models/operations/getqueueresponse.md: last_write_checksum: sha1:bc2deff964aaef49da56b6389b8e67b948381dd5 docs/models/operations/getqueueresponsebody.md: - last_write_checksum: sha1:5e28b0f7a8b49b753ceca4b190c96e48aeecc619 + last_write_checksum: sha1:798a4cc16a258ec5250075a851c39a9a540546e4 docs/models/operations/getqueuestatsrequest.md: - last_write_checksum: sha1:896e9a9f220b0691c573dbaacba15c938f242f9a + last_write_checksum: sha1:146efb753c89a823db94024b744ba8382dde8e96 docs/models/operations/getqueuestatsresponse.md: last_write_checksum: sha1:8fe3a6b0cdfa15f8231d6c46adeac5a441648556 docs/models/operations/getqueuestatsresponsebody.md: - last_write_checksum: sha1:94249f86dfc1ed08f1ca84dc09c28e511eb72b58 - docs/models/operations/getqueuetype.md: - last_write_checksum: sha1:9bc61edc987f54e9bf10b96694cd2ebf0666fe65 + last_write_checksum: sha1:fbc02f5d989bbb5613caba833cd26f34a6b75e5e docs/models/operations/getwebhookeventtype.md: last_write_checksum: sha1:651bd2ffd7aba97f1053ec9f6acbd85897ae845f docs/models/operations/getwebhookpayloadversion.md: last_write_checksum: sha1:6c6876d8f42cc44b92f79164bbbcbbd26121669a docs/models/operations/getwebhookrequest.md: - last_write_checksum: sha1:021a1529d2d5d6658370db87238bbfff2c9533c8 + last_write_checksum: sha1:0c59d8e3e599c195a364e1e7c36cdec45a97b2df docs/models/operations/getwebhookresponse.md: last_write_checksum: sha1:d88448911d8fe6345249520cc7dc0a719ff6ab1f docs/models/operations/getwebhookresponsebody.md: last_write_checksum: sha1:f36ce817e93a60189f120dd6f9e5b53ea075804c docs/models/operations/getwebhooksecretrequest.md: - last_write_checksum: sha1:89959e08d613773890548277e568faf2ce12dace + last_write_checksum: sha1:b0678d2ab92cb3aa9e034025f1679bc2fda11bf6 docs/models/operations/getwebhooksecretresponse.md: last_write_checksum: sha1:c05845a3d22d532a4caac45edd3a7eaa59218a78 docs/models/operations/getwebhooksecretresponsebody.md: last_write_checksum: sha1:df2febc57a34365bff65d3c9218d60957c95a0f9 docs/models/operations/getwordlistembeddingstatusrequest.md: - last_write_checksum: sha1:31ce26a1833681875e9d28b74604451e3b48a4ce + last_write_checksum: sha1:d12e11cd2ffc2203c68d6bada1c8cfd925a28714 docs/models/operations/getwordlistembeddingstatusresponse.md: last_write_checksum: sha1:76b4490efc7cc5afa40133555662ba674ebd854d docs/models/operations/getwordlistembeddingstatusresponsebody.md: last_write_checksum: sha1:a7e9788805217893b58f157d805c9218ff75d1c7 docs/models/operations/getwordlistrequest.md: - last_write_checksum: sha1:c19458eb164fc604bab836512cbb76360ed79c14 + last_write_checksum: sha1:b534949605201133385f9bcdfce61316305216c3 docs/models/operations/getwordlistresponse.md: last_write_checksum: sha1:340168e7438d7ba4b138ede2dcfda48c43af2875 docs/models/operations/getwordlistresponsebody.md: @@ -423,8 +537,8 @@ trackedFiles: last_write_checksum: sha1:f288c3cc000408e4c0e9aa74513d2bb9de77c4cc docs/models/operations/insight.md: last_write_checksum: sha1:3c50a87c83b679f32361dbe798d6279c296fc751 - docs/models/operations/isflagged.md: - last_write_checksum: sha1:f2a517c1ebc1a56360feb147c0c62b76b7340422 + docs/models/operations/label.md: + last_write_checksum: sha1:323cfd37256b2d8aa728a4afda73d27f65f6e792 docs/models/operations/languageinsight.md: last_write_checksum: sha1:c28d6b66bda6c44efcab43b6d935d8fee3e84ce0 docs/models/operations/listactionsdata.md: @@ -436,7 +550,7 @@ trackedFiles: docs/models/operations/listactionsqueuebehaviour.md: last_write_checksum: sha1:c45c55b748d0a1f643527f4d2212398024e84841 docs/models/operations/listactionsrequest.md: - last_write_checksum: sha1:ef66a392e5055de3a14dee220d31dc6709d1d096 + last_write_checksum: sha1:6f37fbbd22e44717f545cbb695e42b2c4a90aa80 docs/models/operations/listactionsresponse.md: last_write_checksum: sha1:f226965d72e0a1ccb696dc3299b28301a9744d85 docs/models/operations/listactionsresponsebody.md: @@ -444,13 +558,11 @@ trackedFiles: docs/models/operations/listactionstype.md: last_write_checksum: sha1:b0124bdff2185a8b2b098222116b506ebd6bbc5b docs/models/operations/listauthorsrequest.md: - last_write_checksum: sha1:28cf4664e566213db4b7799faf7639d00f348df4 + last_write_checksum: sha1:a6981b2e8f13dc0e7e51584a25cd0aaab2ab51bd docs/models/operations/listauthorsresponse.md: last_write_checksum: sha1:f3fc55319ff6a6dfb11dd98b724aafbed49fed31 docs/models/operations/listauthorsresponsebody.md: last_write_checksum: sha1:e72198423ec4e35615572fce28d63b09bc9ce92f - docs/models/operations/listauthorssortdirection.md: - last_write_checksum: sha1:530f5ed9bcb8019232d25a538fcd061b6014280b docs/models/operations/listchannelsrequest.md: last_write_checksum: sha1:3b4acb2c5d962add99d23415bca1dc0a1ac42170 docs/models/operations/listchannelsresponse.md: @@ -463,22 +575,18 @@ trackedFiles: last_write_checksum: sha1:c637a4bf36e344833ff563bad19a8bd2b9c24b53 docs/models/operations/listprojectsresponsebody.md: last_write_checksum: sha1:fad417911f494d615fc0aade7a8a8586cc3f8471 - docs/models/operations/listqueueitemsaction.md: - last_write_checksum: sha1:45bbe44547b09b0550d352e4f357657af726fbf9 - docs/models/operations/listqueueitemsdata.md: - last_write_checksum: sha1:459ef4c5f8d78454589999825312371e0414d035 - docs/models/operations/listqueueitemslabel.md: - last_write_checksum: sha1:a003f86f14293731007260266918c992dc011fee docs/models/operations/listqueueitemsrequest.md: - last_write_checksum: sha1:fb25737d0de2c007a91e7e5e31724f3d3f915a73 + last_write_checksum: sha1:56dfc37a4fe31849434906a40d22b1f78266e686 docs/models/operations/listqueueitemsresponse.md: last_write_checksum: sha1:742d2e294f44d0f537cf4eaa8dc1b2252b5363f4 docs/models/operations/listqueueitemsresponsebody.md: - last_write_checksum: sha1:1619b03b289990c64f265702fa30fd126aff2e1a - docs/models/operations/listqueueitemssortdirection.md: - last_write_checksum: sha1:189b90a97bf9b7048dd6f3af1561e163f5fd6e7c - docs/models/operations/listqueueitemsstatus.md: - last_write_checksum: sha1:db313459b27181518b1800969e6c7066069e6ab4 + last_write_checksum: sha1:ffd45a0bfbf6f9e213c7a3fef478bc78edf8c504 + docs/models/operations/listqueuesrequest.md: + last_write_checksum: sha1:6dd31a04f2c35b8f2743e68a7a5d66983ba5f17f + docs/models/operations/listqueuesresponse.md: + last_write_checksum: sha1:f645b34f7969aa001b4a1585cb9d5fb16fc42626 + docs/models/operations/listqueuesresponsebody.md: + last_write_checksum: sha1:964546e9238079d8d2de97123823fff0ad1f30e5 docs/models/operations/listwebhooksdata.md: last_write_checksum: sha1:302c2a7f955a8bb0ad5a7620c2908d5387d52c54 docs/models/operations/listwebhookseventtype.md: @@ -486,7 +594,7 @@ trackedFiles: docs/models/operations/listwebhookspayloadversion.md: last_write_checksum: sha1:7a0d6ff7cf56f1bffaf77661e74b5b7faa96773c docs/models/operations/listwebhooksrequest.md: - last_write_checksum: sha1:ac7089005d2ec61d52885238aa643a647308a5c2 + last_write_checksum: sha1:e4c392679b07a9bebe94fa7bb04177dc2e425b7d docs/models/operations/listwebhooksresponse.md: last_write_checksum: sha1:7f02894a48288acfa3c406ed08007258f391d7a3 docs/models/operations/listwebhooksresponsebody.md: @@ -494,7 +602,7 @@ trackedFiles: docs/models/operations/listwordlistsdata.md: last_write_checksum: sha1:b367fd60cd4567cf0d6ac35f87118fa82cd682d4 docs/models/operations/listwordlistsrequest.md: - last_write_checksum: sha1:dc119062930464fa521085f0441782b77f6a04dd + last_write_checksum: sha1:a279b5a2c9480617d56ac25d4926237b31aa80ca docs/models/operations/listwordlistsresponse.md: last_write_checksum: sha1:d33aad0d459ed94a16f2e99196cdfa08fc404039 docs/models/operations/listwordlistsresponsebody.md: @@ -505,12 +613,8 @@ trackedFiles: last_write_checksum: sha1:0c95260fd590067ee9e2be732b7ffecfe1c84703 docs/models/operations/matchedrule.md: last_write_checksum: sha1:b9bc447ac612f3b21e2c5cd263493e0bafe3616a - docs/models/operations/mediatype.md: - last_write_checksum: sha1:c2c21148d29b5d0743f54d5a2b72cc55154af00c docs/models/operations/meta.md: last_write_checksum: sha1:06d4d930370fbbe0e0471b5367fee9ecd5057f98 - docs/models/operations/metadatafilter.md: - last_write_checksum: sha1:d89ab2c8615477fc1ffdbbcfbbe5b193798556d7 docs/models/operations/metastatus.md: last_write_checksum: sha1:2ea0245dd5e497f832ebbf246956f26df9910cf7 docs/models/operations/metatype.md: @@ -529,42 +633,48 @@ trackedFiles: last_write_checksum: sha1:a01bc15020346ced62c9c30b1536afce4bdd984f docs/models/operations/policyrequest.md: last_write_checksum: sha1:e46cc347c82e08240a589f866155752577110cff - docs/models/operations/policyresponse.md: - last_write_checksum: sha1:0d6c9ea73b10a578221db37cb594ecc86ade6ac2 docs/models/operations/political.md: last_write_checksum: sha1:2e9360bac5b226f5213e89e319a1a0efe702d2c2 + docs/models/operations/previousperiod.md: + last_write_checksum: sha1:2cedd1667c23f7941ca58568e529acc3b96e81c2 docs/models/operations/profanity.md: last_write_checksum: sha1:96db22d6e0f87e1439e0988b5487673123195acb docs/models/operations/promotion.md: last_write_checksum: sha1:6d7348fa027a7ca998f58ee0b9daf700c4287b61 - docs/models/operations/queue.md: - last_write_checksum: sha1:0543bc886b79a12f00176c9c9376f16186da3b79 docs/models/operations/reasoncode.md: last_write_checksum: sha1:45782bac9cb0e92c833339788eab208fdc85ec5b docs/models/operations/reasoncodeenum.md: last_write_checksum: sha1:9b2f9fe2aafa6b75258e9ae6f3a474f0e32cd2f0 docs/models/operations/recommendation.md: - last_write_checksum: sha1:3711e3a2f928491b32bc2c6ca59b1c71a54e6e42 + last_write_checksum: sha1:7231d6311be79410b5fc5fd8e5a7277ea6a1086c docs/models/operations/religion.md: last_write_checksum: sha1:60a7524aee8d44058881d8a10476e8ba57c7d461 docs/models/operations/removewordlistwordsrequest.md: - last_write_checksum: sha1:8b02f557f76724083a5dfb65a8dcf98517dea1cc + last_write_checksum: sha1:bc69ddd064e9974f8f7908118a03dbf2ce74f2c1 docs/models/operations/removewordlistwordsresponse.md: last_write_checksum: sha1:37952680c9ae4ddd92d0f937e2461bb4b67b8023 docs/models/operations/removewordlistwordsresponsebody.md: last_write_checksum: sha1:def6fad308c85268f2497306789d01bbd6def4bf docs/models/operations/resolvequeueitemrequest.md: - last_write_checksum: sha1:e6dd0fead0acf3b8e03383b9b9b8abc623a68059 - docs/models/operations/resolvequeueitemrequestbody.md: - last_write_checksum: sha1:5d9c9ecc2d27f1273a86d3d53339a33679ce4657 + last_write_checksum: sha1:aeac5804fec81f40a18df878e0b77e68772ba009 docs/models/operations/resolvequeueitemresponse.md: last_write_checksum: sha1:2b979b11815dd8da34ad0cda2e962f86f82ffe9d docs/models/operations/resolvequeueitemresponsebody.md: - last_write_checksum: sha1:b9cf836bb5f6543401171c776aa9bca1563ccf19 + last_write_checksum: sha1:a2e4d3eaf4f2abcdae06b3cdabf32bd2e156228a + docs/models/operations/resolvequeueitemsrequest.md: + last_write_checksum: sha1:d4ffc421aa33c7aa1e877d4b04058562ac56b3ac + docs/models/operations/resolvequeueitemsrequestbody.md: + last_write_checksum: sha1:05591c511d094304a255f5637957e3f8678917b3 + docs/models/operations/resolvequeueitemsresponse.md: + last_write_checksum: sha1:f2fdc411b3ea13849af86792a7c29e990fcac7c5 + docs/models/operations/resolvequeueitemsresponsebody.md: + last_write_checksum: sha1:4a33d72c110df9c1be8e9dcdfcaa7c0738a4cbd2 docs/models/operations/respectinsight.md: last_write_checksum: sha1:2234db7794940b4f0f4c39e255a9b5e33114d335 docs/models/operations/reviewstats.md: - last_write_checksum: sha1:8b7a0be8e30a14a0fc872297b49f91ff8417389c + last_write_checksum: sha1:176a72d5a23e8f973a3a860db035c0425fdbc357 + docs/models/operations/rule.md: + last_write_checksum: sha1:0b5d1aa8db265c1acfe7a39d785a7c81ecc57075 docs/models/operations/scores.md: last_write_checksum: sha1:008988e12b8b0d73c42789af9a36f61ca47bbd92 docs/models/operations/selfharm.md: @@ -583,24 +693,28 @@ trackedFiles: last_write_checksum: sha1:8f43e6165bdfa6ef83c3db7c22238358a9f23263 docs/models/operations/signalsresponse.md: last_write_checksum: sha1:5b353278302ad0b1cbdd679f0bcba3d3f7daa12a + docs/models/operations/sort.md: + last_write_checksum: sha1:95eebfceaa7d2bff93bce63c80396fc17c3bdca6 docs/models/operations/sortby.md: - last_write_checksum: sha1:caa2f37d963e5a7897ef0e4c7e834ef2112ea1b9 - docs/models/operations/sortfield.md: - last_write_checksum: sha1:9995e8f3c61c255061d4313dddbde9015f9faead + last_write_checksum: sha1:1b1edd5725c7f62071e643064436dea559772933 + docs/models/operations/sortdirection.md: + last_write_checksum: sha1:683393fea5723945a2739bb99b07118ee2cead9c + docs/models/operations/source.md: + last_write_checksum: sha1:b353678810403f0d134c5f40ccc3c5bea18c0d57 docs/models/operations/spam.md: last_write_checksum: sha1:116eddb4243c96f3edcdbf1f54f247d27cc9e1f5 - docs/models/operations/submitcontentlabel.md: - last_write_checksum: sha1:3a0ae77b3a47a2b76c6dc64214a54c1052a9912c - docs/models/operations/submitcontentrecommendationaction.md: - last_write_checksum: sha1:6bfd5d79248f31aabbc398a94fc7f86212e914dc + docs/models/operations/submitcontentauthor.md: + last_write_checksum: sha1:8c0665af9e3d1b67843f33c0dbe8f98c34ecc3d2 + docs/models/operations/submitcontentpolicyresponse.md: + last_write_checksum: sha1:383f895a0739c9d819c07eae4c9899c49dc9a4ca docs/models/operations/submitcontentrequest.md: - last_write_checksum: sha1:9a9a6c2c9d6d8ef67121a5ea7f218b10b5570251 + last_write_checksum: sha1:4992b01e038f9224c6f069e9571a07a540185eef docs/models/operations/submitcontentrequestbody.md: - last_write_checksum: sha1:787c85ccd1bd99790a05ed652b5fc61c11a37a4a + last_write_checksum: sha1:bfb4c3a300514d6eee022c19af9f66f77569a648 docs/models/operations/submitcontentresponse.md: last_write_checksum: sha1:c7f8c3160bb9f0334022cd29f35780cada7e2a22 docs/models/operations/submitcontentresponsebody.md: - last_write_checksum: sha1:e3c1813a1eb958d8c67283f7ab0b179e0bc21329 + last_write_checksum: sha1:3150c95ae933694ca052c336fa7eb7ed9dbeb404 docs/models/operations/textrequest.md: last_write_checksum: sha1:5504d33c603553cf5434bcc71ea51e6ffa339493 docs/models/operations/textresponse.md: @@ -609,30 +723,30 @@ trackedFiles: last_write_checksum: sha1:1774765bb79ede6c95f1dc78b423b8ddd4039119 docs/models/operations/tobacco.md: last_write_checksum: sha1:61e28f869e7520be39d7acd75a6ab347329200f1 - docs/models/operations/topaction.md: - last_write_checksum: sha1:cb6d3f756ccfe4d1a7e40c134c2949478a5d6acf docs/models/operations/topic.md: last_write_checksum: sha1:44f7f7f6b3658bb1c3c82e1c2eb6ba488eefc173 docs/models/operations/topreviewer.md: - last_write_checksum: sha1:6e523866fcd571ae5b482b456d2201e03632051d + last_write_checksum: sha1:e6b4d90b54bbad8347478d0710ff5c9c12e27a58 + docs/models/operations/totals.md: + last_write_checksum: sha1:7c03f70d6d037b158899aaa6efe0052032d15634 docs/models/operations/toxicity.md: last_write_checksum: sha1:ea0d03623c248213108d8c94ffc773b492fae9b9 docs/models/operations/transcriptionquality.md: last_write_checksum: sha1:e726da3903b3351d3d54222ac23926721482a134 docs/models/operations/trends.md: - last_write_checksum: sha1:b94d60c5c8769b7f02f8f7949533917c4ea2f993 + last_write_checksum: sha1:896458c2c4d6db0a02757bfe454b701ef1251f42 docs/models/operations/trustlevel.md: last_write_checksum: sha1:2c6430450c436021710ec3ceb5a9daac5add8230 docs/models/operations/unicodespoofing.md: last_write_checksum: sha1:79534af1086c3960979eeadb5a132cbba08a993a docs/models/operations/unresolvequeueitemrequest.md: - last_write_checksum: sha1:2f2a77cb45f830ce1c4c0af3c0157648ed1a6b15 - docs/models/operations/unresolvequeueitemrequestbody.md: - last_write_checksum: sha1:e3bc1ac8ae2c278f883964a8a04beb4af0ccd7d3 + last_write_checksum: sha1:1c6256d300d386b67c88b7a50a1693a152c9bec1 docs/models/operations/unresolvequeueitemresponse.md: last_write_checksum: sha1:b83c7f0e09b623e5a18cb3f1cfc976d21f6c6cb9 docs/models/operations/unresolvequeueitemresponsebody.md: - last_write_checksum: sha1:e187a2c89ef31c0200698fcd2b8cf92593393980 + last_write_checksum: sha1:510b3ccd1a889b3c115af62f525e2b34fc38043e + docs/models/operations/unresolvequeueitemstatus.md: + last_write_checksum: sha1:513482f02ce5e56923982544c9072ea694eb96f4 docs/models/operations/updateactionpositionrequest.md: last_write_checksum: sha1:c25a31224f616bb58276096e828d021e5856d405 docs/models/operations/updateactionpositionresponse.md: @@ -646,7 +760,7 @@ trackedFiles: docs/models/operations/updateactionqueuebehaviourresponse.md: last_write_checksum: sha1:59ae0036f1021859681cd67d605936219ec9ff2e docs/models/operations/updateactionrequest.md: - last_write_checksum: sha1:4af425d4edd0355e92debec1b365b9bbb8d06323 + last_write_checksum: sha1:ae068f26dc2b58977ff43226ab8e5b657e42ba5c docs/models/operations/updateactionrequestbody.md: last_write_checksum: sha1:bf288fb88758ed516fc055ae541ae171a3db848c docs/models/operations/updateactionresponse.md: @@ -660,7 +774,7 @@ trackedFiles: docs/models/operations/updateauthormetadata.md: last_write_checksum: sha1:19f1c36225459beae124087d1919a5f20373db33 docs/models/operations/updateauthorrequest.md: - last_write_checksum: sha1:b196806fae40d5230a273bea3da9629c4bbacb61 + last_write_checksum: sha1:3cb7dcd2b734f9fd4c992de3ee3cb87e17e39467 docs/models/operations/updateauthorrequestbody.md: last_write_checksum: sha1:6ac6aed5642dd8b5ad732df5ebdcd90c3b318c8e docs/models/operations/updateauthorresponse.md: @@ -686,7 +800,7 @@ trackedFiles: docs/models/operations/updatewebhookpayloadversion.md: last_write_checksum: sha1:0e7216f64eb36beaf459a533edc2f454cb55c910 docs/models/operations/updatewebhookrequest.md: - last_write_checksum: sha1:55e62c24b5dca07c95558de543594f47e45849f6 + last_write_checksum: sha1:4a1930990bccdb8bc409c7efe1997820ae1bc87a docs/models/operations/updatewebhookrequestbody.md: last_write_checksum: sha1:2227e58ef090e34aa938a855fd852af5fc854d3a docs/models/operations/updatewebhookresponse.md: @@ -694,9 +808,9 @@ trackedFiles: docs/models/operations/updatewebhookresponsebody.md: last_write_checksum: sha1:c9ae9ad53cf50e0505407e7148372645b332ebd9 docs/models/operations/updatewordlistrequest.md: - last_write_checksum: sha1:fa89e751dfb41bea23cdaf1df37d380bf3b52eab + last_write_checksum: sha1:a0226079e92e174c6e4c8a421892d2740db9464e docs/models/operations/updatewordlistrequestbody.md: - last_write_checksum: sha1:3087cb17ef97b5adc13488d30fc6a80ad59030f6 + last_write_checksum: sha1:72304c6c9e696f53bfad84df07184472616a3acf docs/models/operations/updatewordlistresponse.md: last_write_checksum: sha1:be2498787f1a4d91d09d34ea85c4be1013ed5228 docs/models/operations/updatewordlistresponsebody.md: @@ -715,34 +829,40 @@ trackedFiles: last_write_checksum: sha1:b89d6ace94664bc13b917b6cfacab1503931233a docs/models/operations/violence.md: last_write_checksum: sha1:89749fd561e43b1e43d6a8a5b384f13d95739e46 + docs/models/operations/volume.md: + last_write_checksum: sha1:a1de480939734a6285a9d4d9e3be8a363ca45b51 docs/models/operations/weapons.md: last_write_checksum: sha1:ca042d36ecc6db37ed645eb2e54358a59baf02ed - docs/models/operations/withinunit.md: - last_write_checksum: sha1:466d94909b10b82969067ddba11085bb507fb3d4 docs/sdks/account/README.md: - last_write_checksum: sha1:13beaa2b1485bdfcef8887acc5b942bc935ae616 + last_write_checksum: sha1:8287c6d548c1942909e34ec4c9dc7e5cbb966c83 docs/sdks/actions/README.md: - last_write_checksum: sha1:7095a9b9d529f8249d59ed8d87a8176d12893e15 + last_write_checksum: sha1:698e3600b3ae9416e882ccfc7f2204de9d49949b + docs/sdks/analytics/README.md: + last_write_checksum: sha1:8e703b00a8e03fed2d138c7bcccb15cf091b8d22 + docs/sdks/apikeys/README.md: + last_write_checksum: sha1:c277df0dc195f6588c29736d6c4ee2c062a92061 docs/sdks/authors/README.md: - last_write_checksum: sha1:5dc3fef30800c9cfd3e2a5ddba7ecf52c48affb4 + last_write_checksum: sha1:7800c609dcf0d08704bc564985dc5daf8b9283ad docs/sdks/channels/README.md: last_write_checksum: sha1:ed1f37cd92ff8ef60df01de8567e533f4c2adf26 docs/sdks/content/README.md: - last_write_checksum: sha1:cceebfb98c4eb56acb37772c5cd4388e18480c02 + last_write_checksum: sha1:6eb462eba4263a50a6f9f023e26f52d766dd7eba + docs/sdks/feedback/README.md: + last_write_checksum: sha1:a01d711b5e761184a0033a59f4604075be684cfb docs/sdks/items/README.md: - last_write_checksum: sha1:4eed53ce5c58e2a96404e4b225ae1a3c7ada8e94 + last_write_checksum: sha1:81e26c6ed42bebc36d969bcb798b9422b8fa95f1 docs/sdks/projects/README.md: last_write_checksum: sha1:623605cf28283e448ae1c5a1137bb3005725b6cf docs/sdks/queue/README.md: - last_write_checksum: sha1:8e7baf61d3b5633a3e526720abc387e9b922d145 + last_write_checksum: sha1:95c3ccc149a05d222c8bcfbe649fc13d2468ead3 docs/sdks/webhooks/README.md: - last_write_checksum: sha1:d503ea75c0567888596497454f0ee806769c8882 + last_write_checksum: sha1:6304a26e05055e14f748bc7ae10312e102b88244 docs/sdks/webhooksecret/README.md: - last_write_checksum: sha1:1b5b1c9b94a72c4953c237fc155ade56aa2fc26d + last_write_checksum: sha1:817c8bad58bd102383e2a3a17b6bb13d92a6fcc3 docs/sdks/wordlist/README.md: - last_write_checksum: sha1:4ed5429220a895ff28d2da524c95db24e4e10a70 + last_write_checksum: sha1:837e7fcfc17ef38f187af6d308be6fd7a89e6cdc docs/sdks/words/README.md: - last_write_checksum: sha1:25b059bb7ffac5ad5e42f61719dd99235971bd03 + last_write_checksum: sha1:e0b9bb6b768f98744d317e37a05c9f90ad17030d lib/crystalline.rb: last_write_checksum: sha1:b6ec0a2833f58ba9a6f07c9637fdca05e59006d3 lib/crystalline/enum.rbi: @@ -756,29 +876,35 @@ trackedFiles: lib/crystalline/utils.rb: last_write_checksum: sha1:b32469851da6f9f729e484ade6a23b38639a652a lib/moderation_api.rb: - last_write_checksum: sha1:763da34902f08acf7a9d8e7924a5b6c5393bfffa + last_write_checksum: sha1:cc55cd355ce1b4ca083afbb3e6217ed0044ad1f7 lib/moderation_api/account.rb: last_write_checksum: sha1:ea3cfe55787ecb7cc8ed798b76d4036b1aa3d3bc lib/moderation_api/actions.rb: last_write_checksum: sha1:176a1320c5e48a9a9198fa2f934aea4719173fbe + lib/moderation_api/analytics.rb: + last_write_checksum: sha1:6a23dddf048a3ca91c1a78c1bc75ac97f1ab5e15 + lib/moderation_api/apikeys.rb: + last_write_checksum: sha1:bc9c59b88e2aa7858c248ec13e4fa42569878378 lib/moderation_api/authors.rb: - last_write_checksum: sha1:47b399a9643de6d98227d66b044096be24e1e9af + last_write_checksum: sha1:0753376a42796e32cc32f15b8492a235debe8a21 lib/moderation_api/channels.rb: last_write_checksum: sha1:8d995eac91d890d34e95f9c6120c503337bda145 lib/moderation_api/content.rb: last_write_checksum: sha1:f167674cc2738936de6ea0d3d2da6a9bf76cf918 + lib/moderation_api/feedback.rb: + last_write_checksum: sha1:184f119c5d2fc1bcb5f65416c2d61ae445759303 lib/moderation_api/items.rb: - last_write_checksum: sha1:82a08cca3366a7ca3ba4cd8fcdb000eef26441c8 + last_write_checksum: sha1:6c0728649b25ff1b8ffe80e2ea0cbf03d3d81cc2 lib/moderation_api/models/callbacks.rb: last_write_checksum: sha1:00479d36cc70b26d311a89c2162e1eecd7986e77 lib/moderation_api/models/components.rb: - last_write_checksum: sha1:41136496ef989b93db5c1803bcc62f11c01cd389 + last_write_checksum: sha1:d44c94905d9d8be9e525c5b046aec67b8761cf73 lib/moderation_api/models/components/authenticationerror_code.rb: last_write_checksum: sha1:474270271c2fe89211e7f982de9c2ac9e6e86515 lib/moderation_api/models/components/authenticationerror_code.rbi: last_write_checksum: sha1:a1a0028346f661780407ec3c9c34637d1c0ec430 lib/moderation_api/models/components/badrequesterror_code.rb: - last_write_checksum: sha1:50c6b6feb5cf6032640091167d8252c511c3269b + last_write_checksum: sha1:235c9dc0d8b9cc39c95ff1ebf8b12adf76b10ef1 lib/moderation_api/models/components/badrequesterror_code.rbi: last_write_checksum: sha1:b8873c1661cf42e27ff7442421c0767fe3f59634 lib/moderation_api/models/components/block.rb: @@ -809,6 +935,10 @@ trackedFiles: last_write_checksum: sha1:db61f2867e6c8680e68a049f092aca106ac43c06 lib/moderation_api/models/components/internalservererror_code.rbi: last_write_checksum: sha1:cebc65ed8fef50bf0bd22361938f89f87221667d + lib/moderation_api/models/components/label.rb: + last_write_checksum: sha1:37e80d0d5783bc3c889f4f6fcbd054b07eeff87e + lib/moderation_api/models/components/label.rbi: + last_write_checksum: sha1:89e907e292e826c015ea920832ea3f183e98a30a lib/moderation_api/models/components/metadata.rb: last_write_checksum: sha1:7589c546c3b1b2bd1d4fa2996cda559d914cfa34 lib/moderation_api/models/components/metadata.rbi: @@ -818,7 +948,7 @@ trackedFiles: lib/moderation_api/models/components/metrics.rbi: last_write_checksum: sha1:95c03d4a4bd7d62c1ade2d222c880a0bf13fa734 lib/moderation_api/models/components/notfounderror_code.rb: - last_write_checksum: sha1:494c688e2d10322d898b37b8fdefec4f92e47151 + last_write_checksum: sha1:f5be44bc955df169eb62dd8e742db4ff548b3d68 lib/moderation_api/models/components/notfounderror_code.rbi: last_write_checksum: sha1:06e1179caa437bd9cff61b84e19a423c6a59bab7 lib/moderation_api/models/components/pagination.rb: @@ -841,6 +971,10 @@ trackedFiles: last_write_checksum: sha1:514e5e9787e2d1e62aba24122df521db11fb2b53 lib/moderation_api/models/components/project_globalflaggingmode.rbi: last_write_checksum: sha1:68d569f50527cf888bdab1b61a7f7b35dc313fd1 + lib/moderation_api/models/components/projectapikey.rb: + last_write_checksum: sha1:8ed15aca6f3fff24bcce764f467ac3eea18e8208 + lib/moderation_api/models/components/projectapikey.rbi: + last_write_checksum: sha1:042d07d0452fbcd0d24911cbd108a7b90ad538cf lib/moderation_api/models/components/projectwithkey.rb: last_write_checksum: sha1:465f81b2880e77c70a4edac8523043e6cc7571ea lib/moderation_api/models/components/projectwithkey.rbi: @@ -850,9 +984,85 @@ trackedFiles: lib/moderation_api/models/components/projectwithkey_globalflaggingmode.rbi: last_write_checksum: sha1:0c00dc18e9aab8ffce7e6d094c34d28d1e5a0393 lib/moderation_api/models/components/publicauthor.rb: - last_write_checksum: sha1:ba51f8f9b4a6590ea847106151c658d816d8cd94 + last_write_checksum: sha1:2e3fe1b65f1c7b4959fcf14f18227512930a0ccd lib/moderation_api/models/components/publicauthor.rbi: last_write_checksum: sha1:05281e976183d5b33938ce072b6e6a12b33b97b8 + lib/moderation_api/models/components/publicauthor_status.rb: + last_write_checksum: sha1:808cf4bc947f814834dd72ccd0a3c62f925b3be5 + lib/moderation_api/models/components/publicauthor_status.rbi: + last_write_checksum: sha1:35ec89859d3f39ab4db4662c96692dd35ed39832 + lib/moderation_api/models/components/queue.rb: + last_write_checksum: sha1:a955ebfab276b4d530927ef9f00970caac15d18a + lib/moderation_api/models/components/queue.rbi: + last_write_checksum: sha1:3a00381410a202d5b63540601480896e9c7cddde + lib/moderation_api/models/components/queueitem.rb: + last_write_checksum: sha1:7e0fd1d8988ff4de337e7410a81a012fd74efe0f + lib/moderation_api/models/components/queueitem.rbi: + last_write_checksum: sha1:43f900ce46cff89a3a5fce7d857bbf9f65d65a68 + lib/moderation_api/models/components/queueitem_audio.rb: + last_write_checksum: sha1:28f508e453f1863f0f9d6aa9e211a2aca0b8c228 + lib/moderation_api/models/components/queueitem_audio.rbi: + last_write_checksum: sha1:dc4a8054ab148f7822b6721325f68f41e9fa1163 + lib/moderation_api/models/components/queueitem_brand_impersonation.rb: + last_write_checksum: sha1:bba382dcf4d9c2c0224599f751f945081a11857c + lib/moderation_api/models/components/queueitem_brand_impersonation.rbi: + last_write_checksum: sha1:a739651ac47cae794dd7567ba271319884d1ef51 + lib/moderation_api/models/components/queueitem_content.rb: + last_write_checksum: sha1:95cdf385484c664a7de4cda3b2b1a1c12a345aa2 + lib/moderation_api/models/components/queueitem_content.rbi: + last_write_checksum: sha1:c98420421d37b1d5aa5b04944da615d619fad745 + lib/moderation_api/models/components/queueitem_content_leaf.rb: + last_write_checksum: sha1:634849c0ead2f3fe16c4cf99c323375380f81eb6 + lib/moderation_api/models/components/queueitem_content_leaf.rbi: + last_write_checksum: sha1:f2b58fb85c65d714290ea005f1c2f7dff604111a + lib/moderation_api/models/components/queueitem_content_leaf_audio.rb: + last_write_checksum: sha1:75ce5de35400a5c3a0b84518daba66fa25317a39 + lib/moderation_api/models/components/queueitem_content_leaf_audio.rbi: + last_write_checksum: sha1:2591a3b129673bb04ecdac29e9ce22d567c39cd1 + lib/moderation_api/models/components/queueitem_content_leaf_image.rb: + last_write_checksum: sha1:b3dc9e89584e8f3d1fc692ea39dbf8b85e769aaf + lib/moderation_api/models/components/queueitem_content_leaf_image.rbi: + last_write_checksum: sha1:1e928f1ee1d441326203703c037e9ac9fa2782d8 + lib/moderation_api/models/components/queueitem_content_leaf_text.rb: + last_write_checksum: sha1:bf75feab1bb0a39f431335891300212a5f4624b1 + lib/moderation_api/models/components/queueitem_content_leaf_text.rbi: + last_write_checksum: sha1:1583352746aa4bd4e44737094b60e7d98afb8325 + lib/moderation_api/models/components/queueitem_content_leaf_video.rb: + last_write_checksum: sha1:280f53e8ce29823ed2cefd0599c66db7c7ec1c83 + lib/moderation_api/models/components/queueitem_content_leaf_video.rbi: + last_write_checksum: sha1:eae3b1a20c76afb8c2cb69715792e0d2e44832b6 + lib/moderation_api/models/components/queueitem_image.rb: + last_write_checksum: sha1:48c6a4668defd99f7646c6eee4811f141904956f + lib/moderation_api/models/components/queueitem_image.rbi: + last_write_checksum: sha1:9507e2ded4a892b7af051e412553ec94850c6eb6 + lib/moderation_api/models/components/queueitem_match.rb: + last_write_checksum: sha1:20b96e26c384e2a2b27b73699b31339258daca27 + lib/moderation_api/models/components/queueitem_match.rbi: + last_write_checksum: sha1:2514f8c7e69b3aaf59437ab1774614f814362c32 + lib/moderation_api/models/components/queueitem_object.rb: + last_write_checksum: sha1:69607596ff2d92ab40684ed44e76ae488f6ad395 + lib/moderation_api/models/components/queueitem_object.rbi: + last_write_checksum: sha1:0b1cd13971bb240710aecd9491fcb672df8dde91 + lib/moderation_api/models/components/queueitem_signals.rb: + last_write_checksum: sha1:8e4c74cf7c8b2c48241d3c29e6c167d5b9a497b6 + lib/moderation_api/models/components/queueitem_signals.rbi: + last_write_checksum: sha1:ee3328fee8b90c4373eefdda968f442021d68aa3 + lib/moderation_api/models/components/queueitem_status.rb: + last_write_checksum: sha1:807e0c714a71fbfab70faa3dcd0b4bcda444b785 + lib/moderation_api/models/components/queueitem_status.rbi: + last_write_checksum: sha1:3cde3cab2243f7265a35a83075868c39be209910 + lib/moderation_api/models/components/queueitem_text.rb: + last_write_checksum: sha1:8fc3daca0c65953ef7b3e008186b7a173131075a + lib/moderation_api/models/components/queueitem_text.rbi: + last_write_checksum: sha1:d800fe8d51b38a2c5604323c2e9d19fef8aadf5a + lib/moderation_api/models/components/queueitem_video.rb: + last_write_checksum: sha1:9bd99e4871ef5a4e072abdf8fb6f9a4274a6c4a4 + lib/moderation_api/models/components/queueitem_video.rbi: + last_write_checksum: sha1:7342962563471f19305afaccc640ecfdcaad9ef4 + lib/moderation_api/models/components/queuewithcounts.rb: + last_write_checksum: sha1:c2becb1388df4bf35617f6a5378cf8ccde294ca1 + lib/moderation_api/models/components/queuewithcounts.rbi: + last_write_checksum: sha1:abe561fbd33397b42e9e1fa2e3c7193b224f2051 lib/moderation_api/models/components/ratelimiterror_code.rb: last_write_checksum: sha1:5d63967fc31ff7c8541ed743d8d38fa1658582f0 lib/moderation_api/models/components/ratelimiterror_code.rbi: @@ -865,10 +1075,6 @@ trackedFiles: last_write_checksum: sha1:3b3cfd771a9725dae7df228092a8fcc2e2d8503b lib/moderation_api/models/components/security.rbi: last_write_checksum: sha1:65509ac3a5faacfbc7a050f889e3dd412dc4b68f - lib/moderation_api/models/components/status.rb: - last_write_checksum: sha1:fdb496b020ef5ede196059319713408f3f7dee29 - lib/moderation_api/models/components/status.rbi: - last_write_checksum: sha1:0d5f3c64c85a917d9e2d8efbc992ce5de852e207 lib/moderation_api/models/components/transcriptionquality.rb: last_write_checksum: sha1:0d0484fa9a41ca3f9625a96f0b81b03eb672b77e lib/moderation_api/models/components/transcriptionquality.rbi: @@ -888,7 +1094,7 @@ trackedFiles: lib/moderation_api/models/errors/authenticationerror.rbi: last_write_checksum: sha1:ae0e6dd56230d6baf55a5296d2919658868019e6 lib/moderation_api/models/errors/badrequesterror.rb: - last_write_checksum: sha1:2d1897a71c7eaaf353dc8638937ca04d36a63b6c + last_write_checksum: sha1:22046cf018dac521ce9208771508280325699e9a lib/moderation_api/models/errors/badrequesterror.rbi: last_write_checksum: sha1:02ffdc87b1bd37f7308a67f19be1d108c8998ef2 lib/moderation_api/models/errors/conflicterror.rb: @@ -900,7 +1106,7 @@ trackedFiles: lib/moderation_api/models/errors/internalservererror.rbi: last_write_checksum: sha1:af6e1e572554b55fafdff411f7da2e12d9fe62e3 lib/moderation_api/models/errors/notfounderror.rb: - last_write_checksum: sha1:635ddfbbc097626cb9458f97faf1b42e30ccd1f2 + last_write_checksum: sha1:a6e449dd27d774fdc9113ce41bf5edd2e6fa32ed lib/moderation_api/models/errors/notfounderror.rbi: last_write_checksum: sha1:a79456942da7d91ab6a36ac8477d6b165c776e61 lib/moderation_api/models/errors/permissiondeniederror.rb: @@ -912,17 +1118,17 @@ trackedFiles: lib/moderation_api/models/errors/ratelimiterror.rbi: last_write_checksum: sha1:87922693e4ec7f67110e261b50d041d6591d3a6b lib/moderation_api/models/operations.rb: - last_write_checksum: sha1:ba6fa597055216584d0e48fc8e618713b9189190 + last_write_checksum: sha1:2f5aa99b821bb90b2a263a3b518b17db90ee984e lib/moderation_api/models/operations/action_request.rb: last_write_checksum: sha1:dfab71edc86fbc3977a4b8a8a5b781c24536b087 lib/moderation_api/models/operations/action_request.rbi: last_write_checksum: sha1:9b55f6ab3d2ce69f75863a53e4d66f30c04b203b - lib/moderation_api/models/operations/actionstat.rb: - last_write_checksum: sha1:a28c65e13c2d3886c45c5b6dd8d76626d9d1c712 - lib/moderation_api/models/operations/actionstat.rbi: - last_write_checksum: sha1:635fbf99142aa22e216389ef0ff639f4f1411986 + lib/moderation_api/models/operations/action_response.rb: + last_write_checksum: sha1:1f227f774cdebc322196518cd186f796a85984c5 + lib/moderation_api/models/operations/action_response.rbi: + last_write_checksum: sha1:5dc378f5122643238a57e0037bee6ae432cf8ae0 lib/moderation_api/models/operations/addwordlistwords_request.rb: - last_write_checksum: sha1:411f623a6eb4d75ea16b29702f048b23fd0fd33f + last_write_checksum: sha1:752a23f4345309b6d123f10772b73b4a453fb76d lib/moderation_api/models/operations/addwordlistwords_request.rbi: last_write_checksum: sha1:8f48366985fba9cd2f86b47f52eecbcaf6c2ac9e lib/moderation_api/models/operations/addwordlistwords_requestbody.rb: @@ -953,10 +1159,6 @@ trackedFiles: last_write_checksum: sha1:8afe62f525dc92cc2166c40b803812765c876af2 lib/moderation_api/models/operations/audio_response.rbi: last_write_checksum: sha1:d4fbd725ba9b7110dd1767eb90f24ff297f7df1f - lib/moderation_api/models/operations/author.rb: - last_write_checksum: sha1:c60eedad30bbb4b16f349753596db457274eb68c - lib/moderation_api/models/operations/author.rbi: - last_write_checksum: sha1:f10a84a06fe01b81472633a5fddddb3dc31ae639 lib/moderation_api/models/operations/author_status.rb: last_write_checksum: sha1:a05cac37ff9da2bb9d39158e7ba82efc2498b573 lib/moderation_api/models/operations/author_status.rbi: @@ -973,6 +1175,10 @@ trackedFiles: last_write_checksum: sha1:987e096717f8ea05b9f81c72cb98106c88d5580d lib/moderation_api/models/operations/brand_impersonation.rbi: last_write_checksum: sha1:5798503e2d8d52cf90320c3ab0d369a02e0a15ef + lib/moderation_api/models/operations/bucket.rb: + last_write_checksum: sha1:1d48d6de57ee7e6e260196dee0cb3e5e0e41e00d + lib/moderation_api/models/operations/bucket.rbi: + last_write_checksum: sha1:9ed5bd4e984339e5cdfc0c3c267d64fb7458b437 lib/moderation_api/models/operations/cannabis.rb: last_write_checksum: sha1:16988f88755ac344b67e388fc940931009231322 lib/moderation_api/models/operations/cannabis.rbi: @@ -981,24 +1187,16 @@ trackedFiles: last_write_checksum: sha1:40f5fa6b984a0faa4717cb5aedd9558153e399d4 lib/moderation_api/models/operations/casebook.rbi: last_write_checksum: sha1:3cc450913e722b0b9a1b42d0303269dfcebee810 - lib/moderation_api/models/operations/casebookagreement.rb: - last_write_checksum: sha1:eeabf36f3af449adbb1da67f0faf093ca43a360c - lib/moderation_api/models/operations/casebookagreement.rbi: - last_write_checksum: sha1:db7de07fdd72f282c32b9effa7f05f974fb494ef - lib/moderation_api/models/operations/casebookanswer.rb: - last_write_checksum: sha1:76975a988b65e7d212ec466880953f6ba937759e - lib/moderation_api/models/operations/casebookanswer.rbi: - last_write_checksum: sha1:c7725e7b039c6363f093c368779ffd90160126eb + lib/moderation_api/models/operations/channel.rb: + last_write_checksum: sha1:2dfe60ed37a7037f469302f0554d430c5ba5e445 + lib/moderation_api/models/operations/channel.rbi: + last_write_checksum: sha1:b26f313f149bdf74670c718d2475c3f2ddc3d864 lib/moderation_api/models/operations/channel_circumvention.rb: last_write_checksum: sha1:13111c0afef8a66e38cb83b451f549c3c9a1b2d3 lib/moderation_api/models/operations/channel_circumvention.rbi: last_write_checksum: sha1:3285883d27d5f5b7538e79ca1baec97b98b54d48 - lib/moderation_api/models/operations/checkstatus.rb: - last_write_checksum: sha1:1c2d218ae61eaa5cd870c9957ac7eee11801a383 - lib/moderation_api/models/operations/checkstatus.rbi: - last_write_checksum: sha1:1d4c6c13ca76f1857258f394cfc0683b0ea6e4c7 lib/moderation_api/models/operations/classifier_output.rb: - last_write_checksum: sha1:4da59fecf40b0198ff748d1b1b244b55e67e38e5 + last_write_checksum: sha1:8fecf05ea2ec484b4b05b47f86c47642c20cf9c1 lib/moderation_api/models/operations/classifier_output.rbi: last_write_checksum: sha1:df0b635d8d1fbdf710f4dcf91859166595c079f7 lib/moderation_api/models/operations/clientaction.rb: @@ -1058,7 +1256,7 @@ trackedFiles: lib/moderation_api/models/operations/createaction_queuebehaviour_response.rbi: last_write_checksum: sha1:853a04df51eb97327381a7d4d027942838808e3d lib/moderation_api/models/operations/createaction_request.rb: - last_write_checksum: sha1:49b3bcdddf66b5d5879fd128721aed8e388538bc + last_write_checksum: sha1:20ccc9e00f04c37a45f906af4b16d1d080117b48 lib/moderation_api/models/operations/createaction_request.rbi: last_write_checksum: sha1:2c392fdeb47841ebee364e6d71782a7ad1af6130 lib/moderation_api/models/operations/createaction_requestbody.rb: @@ -1086,7 +1284,7 @@ trackedFiles: lib/moderation_api/models/operations/createauthor_metadata.rbi: last_write_checksum: sha1:dd2823e16e0e18fd338752e2ff0211cb7f15a8aa lib/moderation_api/models/operations/createauthor_request.rb: - last_write_checksum: sha1:967c3e9b27ee8dddbff5c2da3073e1dc079e2b3d + last_write_checksum: sha1:1e8c49815630f2b7e14a4b4eb8f74464fb61b7bc lib/moderation_api/models/operations/createauthor_request.rbi: last_write_checksum: sha1:805fa3bcbddbd26d9f598c3f93fef8a8bf1c2662 lib/moderation_api/models/operations/createauthor_requestbody.rb: @@ -1113,6 +1311,26 @@ trackedFiles: last_write_checksum: sha1:1d6b69e30743496c597c42ffed13be240dfbbdad lib/moderation_api/models/operations/createchannel_response.rbi: last_write_checksum: sha1:25a88b1effd2743f491cbcfce687d2a2fdfaaf54 + lib/moderation_api/models/operations/createfeedback_request.rb: + last_write_checksum: sha1:28b150e0f2995ec713217ccaf110b7a051651607 + lib/moderation_api/models/operations/createfeedback_request.rbi: + last_write_checksum: sha1:a4a2d9d6bf67076a7718cf240058cb51f447434a + lib/moderation_api/models/operations/createfeedback_requestbody.rb: + last_write_checksum: sha1:5623af41367478fa1824cb72add7ab3117f5a72b + lib/moderation_api/models/operations/createfeedback_requestbody.rbi: + last_write_checksum: sha1:8558f053060a806baa43c68f938c4f40ae4af0b4 + lib/moderation_api/models/operations/createfeedback_response.rb: + last_write_checksum: sha1:b59539196a219ed68172d9e975960225dff71d1b + lib/moderation_api/models/operations/createfeedback_response.rbi: + last_write_checksum: sha1:f57f9b8ae67bbf5e4369d1423b0e19bda3c01d13 + lib/moderation_api/models/operations/createfeedback_responsebody.rb: + last_write_checksum: sha1:868c0baca3ccbaaf048d5c83b695ed7139d97e09 + lib/moderation_api/models/operations/createfeedback_responsebody.rbi: + last_write_checksum: sha1:c3e267f54e8455689bceef7878fd21d700bbf210 + lib/moderation_api/models/operations/createfeedback_type.rb: + last_write_checksum: sha1:190ab48d5ace3fdfb22a86110ee40ea4c76f6492 + lib/moderation_api/models/operations/createfeedback_type.rbi: + last_write_checksum: sha1:89d6cb5b1e405be53ae352ff992ab930974277ae lib/moderation_api/models/operations/createproject_request.rb: last_write_checksum: sha1:0261b62d1fa59def33337ff51466182ff16f2b11 lib/moderation_api/models/operations/createproject_request.rbi: @@ -1121,6 +1339,18 @@ trackedFiles: last_write_checksum: sha1:12b44a9344000be347d7526ba7e9acfb8ae266c9 lib/moderation_api/models/operations/createproject_response.rbi: last_write_checksum: sha1:77a1e7edede46f0f0e401f9e654e2ee1c7cc193d + lib/moderation_api/models/operations/createprojectapikey_request.rb: + last_write_checksum: sha1:c49f1a46b134c6e8634e0fc3d6911c787161016f + lib/moderation_api/models/operations/createprojectapikey_request.rbi: + last_write_checksum: sha1:381f256e679b84e77aad9a97507b2e468b66d4e5 + lib/moderation_api/models/operations/createprojectapikey_requestbody.rb: + last_write_checksum: sha1:7f7291703a6609139a2f64b9ea5fbf428b5e2738 + lib/moderation_api/models/operations/createprojectapikey_requestbody.rbi: + last_write_checksum: sha1:1743e7394841f3838b6202edde10006a29fa7ad9 + lib/moderation_api/models/operations/createprojectapikey_response.rb: + last_write_checksum: sha1:9c9e5550dc215ff32db1c37a7ce01b41d87d24d3 + lib/moderation_api/models/operations/createprojectapikey_response.rbi: + last_write_checksum: sha1:f40a63b76da7a264732260ce80e26243ee14ea7c lib/moderation_api/models/operations/createwebhook_eventtype_request.rb: last_write_checksum: sha1:0643416d09f87ef794d21c67f530ac7bc792f00c lib/moderation_api/models/operations/createwebhook_eventtype_request.rbi: @@ -1134,7 +1364,7 @@ trackedFiles: lib/moderation_api/models/operations/createwebhook_payloadversion.rbi: last_write_checksum: sha1:2e45b0084d0ed4e0434f63850dbb48a556cde35c lib/moderation_api/models/operations/createwebhook_request.rb: - last_write_checksum: sha1:2964f4d5be1ef160de6c458469bee322f3c74a81 + last_write_checksum: sha1:0cfada3afe36b8df5eaf92eaf7a880d644780941 lib/moderation_api/models/operations/createwebhook_request.rbi: last_write_checksum: sha1:a9ae7fc24c82acdfd0630aea9317abd7a5f9da5d lib/moderation_api/models/operations/createwebhook_requestbody.rb: @@ -1149,6 +1379,22 @@ trackedFiles: last_write_checksum: sha1:4b3526db4633bd11409b756e2b1c0e2c4c1750e9 lib/moderation_api/models/operations/createwebhook_responsebody.rbi: last_write_checksum: sha1:19c7c026b2ad865c2ae766af0d3fab2dc2afc9b4 + lib/moderation_api/models/operations/createwordlist_request.rb: + last_write_checksum: sha1:c6a1d3218413227be4fef6f823e7f96b7770a140 + lib/moderation_api/models/operations/createwordlist_request.rbi: + last_write_checksum: sha1:d71513d5255d9e5e41de8208d4919b114699ed5c + lib/moderation_api/models/operations/createwordlist_requestbody.rb: + last_write_checksum: sha1:8ba6f3779587f4f8eefe7aace8321f8d91032e32 + lib/moderation_api/models/operations/createwordlist_requestbody.rbi: + last_write_checksum: sha1:461cd1af0e19b21d851b2667ae1fdd21065c201f + lib/moderation_api/models/operations/createwordlist_response.rb: + last_write_checksum: sha1:14b93504a7d4d022d4b9c5188ce5faf77637d171 + lib/moderation_api/models/operations/createwordlist_response.rbi: + last_write_checksum: sha1:fdf9b231529d93036dff6508e4a32d5a711ad389 + lib/moderation_api/models/operations/createwordlist_responsebody.rb: + last_write_checksum: sha1:81c05925e049be8c719d06682e5468496b83873a + lib/moderation_api/models/operations/createwordlist_responsebody.rbi: + last_write_checksum: sha1:0c1b1d3fd8aed7792973bd2428991ca62227aecc lib/moderation_api/models/operations/crypto.rb: last_write_checksum: sha1:95dd12f4058ece1f9a4228eb9057ba9ae354a15d lib/moderation_api/models/operations/crypto.rbi: @@ -1162,7 +1408,7 @@ trackedFiles: lib/moderation_api/models/operations/current_project.rbi: last_write_checksum: sha1:70e0338f1910d1daea51fa51ea2d63cf88aa1616 lib/moderation_api/models/operations/dailyreviewcount.rb: - last_write_checksum: sha1:342241820838b83eda4e9a78309e4125b51ea5ea + last_write_checksum: sha1:2f4a31dad7176d2ab15946b56cd6265c8b2c8a1f lib/moderation_api/models/operations/dailyreviewcount.rbi: last_write_checksum: sha1:8e030c4eddce6c55d3a72d0a02e676a02bd00f3f lib/moderation_api/models/operations/data_audio.rb: @@ -1182,7 +1428,7 @@ trackedFiles: lib/moderation_api/models/operations/data_video.rbi: last_write_checksum: sha1:a12143277ab2373c81cd11e614de744ece622ca8 lib/moderation_api/models/operations/deleteaction_request.rb: - last_write_checksum: sha1:84a02b04a6a133dd057ad6ad7e9f4da812dc7ab1 + last_write_checksum: sha1:b2cd25aa0341ef70162cf8a6032a130cc252a436 lib/moderation_api/models/operations/deleteaction_request.rbi: last_write_checksum: sha1:77890b6b725e85d390a3032108aa9677c234a4c3 lib/moderation_api/models/operations/deleteaction_response.rb: @@ -1194,7 +1440,7 @@ trackedFiles: lib/moderation_api/models/operations/deleteaction_responsebody.rbi: last_write_checksum: sha1:42d7625788ac5d314387ccb47c555c828dd55210 lib/moderation_api/models/operations/deleteauthor_request.rb: - last_write_checksum: sha1:d7be7f01c9ef396b304e34a3b8c6ea9a60a703a4 + last_write_checksum: sha1:f0d7f81ce1795bed1b47767da83056c71c93b6bc lib/moderation_api/models/operations/deleteauthor_request.rbi: last_write_checksum: sha1:beed1a4dbf318b0e36d2e989d2fb8b487eb539d1 lib/moderation_api/models/operations/deleteauthor_response.rb: @@ -1230,7 +1476,7 @@ trackedFiles: lib/moderation_api/models/operations/deleteproject_responsebody.rbi: last_write_checksum: sha1:b3d8297878bddf23e6de4f27658aee9b839489a4 lib/moderation_api/models/operations/deletewebhook_request.rb: - last_write_checksum: sha1:1ab558b8baa3a1881d0429d445269273428d9b9a + last_write_checksum: sha1:4249d6b0f7b8dcba10cfa5fab2784d5ddc36bdf5 lib/moderation_api/models/operations/deletewebhook_request.rbi: last_write_checksum: sha1:7084ee1fb42b359c6460a0ff99c668e81c13158f lib/moderation_api/models/operations/deletewebhook_response.rb: @@ -1290,7 +1536,7 @@ trackedFiles: lib/moderation_api/models/operations/evaluation.rbi: last_write_checksum: sha1:7ede0a62266263475bbf0f6ec4ff029f180e1d2b lib/moderation_api/models/operations/executeaction_request.rb: - last_write_checksum: sha1:8567a7443c5252f089055364426c75909f3f39a2 + last_write_checksum: sha1:02d79e3775b7ac5575a6d1d79d6d05a9144dac45 lib/moderation_api/models/operations/executeaction_request.rbi: last_write_checksum: sha1:42184359c803c8c4b96ced107032b9c114ab4712 lib/moderation_api/models/operations/executeaction_requestbody.rb: @@ -1313,28 +1559,20 @@ trackedFiles: last_write_checksum: sha1:63c3b2ae3caf228f670cee297a9556925f35f57d lib/moderation_api/models/operations/face_detection.rbi: last_write_checksum: sha1:099a343d2798722cc63bf9c3d8751210f1990f88 - lib/moderation_api/models/operations/filter.rb: - last_write_checksum: sha1:f715edc09013054f9ab12c899d57dcc04900791e - lib/moderation_api/models/operations/filter.rbi: - last_write_checksum: sha1:779c2c88b491f719935dbce9b23e4ed9ebf66630 - lib/moderation_api/models/operations/filterlabel.rb: - last_write_checksum: sha1:40a567c7fea672e8498c7d3f591527255d87cf2a - lib/moderation_api/models/operations/filterlabel.rbi: - last_write_checksum: sha1:d6698f157a3c40c77cda13332f946bc377cc93f7 - lib/moderation_api/models/operations/flaggedcontenttrend.rb: - last_write_checksum: sha1:ef536be9fb316d947c464c52c28700f685930bfe - lib/moderation_api/models/operations/flaggedcontenttrend.rbi: - last_write_checksum: sha1:00252e78a6646c1c95fe6a7ac5b2b2b4c6f798f4 lib/moderation_api/models/operations/flaggingmode.rb: last_write_checksum: sha1:d10a21ea7982dc2008eed06a64ce1986f9bcc7a5 lib/moderation_api/models/operations/flaggingmode.rbi: last_write_checksum: sha1:13c5d6fefbadfbe0cba84bb9f97cd507ca2a215b + lib/moderation_api/models/operations/flagratespike.rb: + last_write_checksum: sha1:2bc0b82800107ceb9998eb221a8a93c34aeb59fe + lib/moderation_api/models/operations/flagratespike.rbi: + last_write_checksum: sha1:e15cb56c239dc18cddb63d5ce89beabc5178a747 lib/moderation_api/models/operations/gambling.rb: last_write_checksum: sha1:7aea31107d581302bd1d13c17c68d43631c8c813 lib/moderation_api/models/operations/gambling.rbi: last_write_checksum: sha1:3c0dca992e2a39fe1477750ca106948527a73016 lib/moderation_api/models/operations/getaccount_request.rb: - last_write_checksum: sha1:58f3c3c9c410180d71d7ade2ce6a45bdcb2fae22 + last_write_checksum: sha1:cbe88845233353d4e917d2dd083141a1d366aab4 lib/moderation_api/models/operations/getaccount_request.rbi: last_write_checksum: sha1:7f7a1bb1a805283bd9daaaf9313ea298060d7dd3 lib/moderation_api/models/operations/getaccount_response.rb: @@ -1358,7 +1596,7 @@ trackedFiles: lib/moderation_api/models/operations/getaction_queuebehaviour.rbi: last_write_checksum: sha1:c0c32f0051a476d112ad505e50be9517375d5286 lib/moderation_api/models/operations/getaction_request.rb: - last_write_checksum: sha1:2897effc5129abae6be25719f8f2eaeb490b1385 + last_write_checksum: sha1:5026a20f51fc283e7e42690aa7ca2eca4a36b526 lib/moderation_api/models/operations/getaction_request.rbi: last_write_checksum: sha1:dc30593aac4412b1d073846a3c1348faf94d86eb lib/moderation_api/models/operations/getaction_response.rb: @@ -1373,8 +1611,136 @@ trackedFiles: last_write_checksum: sha1:da0122b903cb8d9db5f72a3f3fa5a967e8c18397 lib/moderation_api/models/operations/getaction_type.rbi: last_write_checksum: sha1:394a433ae22d77a213ba8d2ef7863f41e723eed2 + lib/moderation_api/models/operations/getanalyticsauthors_author.rb: + last_write_checksum: sha1:98677ad869cea39bd304c9290b2e2a69bf151e45 + lib/moderation_api/models/operations/getanalyticsauthors_author.rbi: + last_write_checksum: sha1:b8eb69668f3726533998a6c515b944d758171982 + lib/moderation_api/models/operations/getanalyticsauthors_queryparam_range.rb: + last_write_checksum: sha1:7e0ebb2f860c4d91055d8a0d92c13068518ef850 + lib/moderation_api/models/operations/getanalyticsauthors_queryparam_range.rbi: + last_write_checksum: sha1:3b8eaf88d974c9f28eab5c6ff2ce3b8b8645c4c6 + lib/moderation_api/models/operations/getanalyticsauthors_range_response.rb: + last_write_checksum: sha1:c6a9d45ac1752c9a92f9619d9a2a0ef1241f83fe + lib/moderation_api/models/operations/getanalyticsauthors_range_response.rbi: + last_write_checksum: sha1:610fd824bfb4b763120763b00f436b04f34a30f7 + lib/moderation_api/models/operations/getanalyticsauthors_request.rb: + last_write_checksum: sha1:5c9a3d4058f53ed4adae38058accae0ef0da29f2 + lib/moderation_api/models/operations/getanalyticsauthors_request.rbi: + last_write_checksum: sha1:97a3c7c4e2b680d99c94438c3228e59e68bfac58 + lib/moderation_api/models/operations/getanalyticsauthors_response.rb: + last_write_checksum: sha1:229b564e645fdcf757f8df34b0386ee07e8f03ec + lib/moderation_api/models/operations/getanalyticsauthors_response.rbi: + last_write_checksum: sha1:8d69c4d0c8bd99804982e080de1cbe1f8e4bdc5e + lib/moderation_api/models/operations/getanalyticsauthors_responsebody.rb: + last_write_checksum: sha1:eee0666b19ec915f4ba7dccb10424b05ea60a212 + lib/moderation_api/models/operations/getanalyticsauthors_responsebody.rbi: + last_write_checksum: sha1:c943dc2afbef163cbf656bca78e64313e0c94bf7 + lib/moderation_api/models/operations/getanalyticsautomation_queryparam_range.rb: + last_write_checksum: sha1:0bb9995f94feabf30f182ccb708b8a5958fb612b + lib/moderation_api/models/operations/getanalyticsautomation_queryparam_range.rbi: + last_write_checksum: sha1:2aac24be5ac01946f39dfd00b7bacc350fd35fe8 + lib/moderation_api/models/operations/getanalyticsautomation_range_response.rb: + last_write_checksum: sha1:7f6358b705d625b41785661730343ee6c1b7a9ed + lib/moderation_api/models/operations/getanalyticsautomation_range_response.rbi: + last_write_checksum: sha1:eac51d70ac2a2f8d6ecc2f74c62ade71a195d3d3 + lib/moderation_api/models/operations/getanalyticsautomation_request.rb: + last_write_checksum: sha1:406f970ba190bde6b31f96da5def78da1371fd30 + lib/moderation_api/models/operations/getanalyticsautomation_request.rbi: + last_write_checksum: sha1:4b292a1918aac5609cfc4aecea83950f02aa69ec + lib/moderation_api/models/operations/getanalyticsautomation_response.rb: + last_write_checksum: sha1:84ca37a5f33233d9ea47234b22c0831caf5b1735 + lib/moderation_api/models/operations/getanalyticsautomation_response.rbi: + last_write_checksum: sha1:6604fcd976177323a4d2afd82c712d9441ecdfe8 + lib/moderation_api/models/operations/getanalyticsautomation_responsebody.rb: + last_write_checksum: sha1:599808be318d8b493f9a191b807f1bc20e306fc2 + lib/moderation_api/models/operations/getanalyticsautomation_responsebody.rbi: + last_write_checksum: sha1:33e931a51158c652260a73412a4bb36165b30b21 + lib/moderation_api/models/operations/getanalyticschannels_queryparam_range.rb: + last_write_checksum: sha1:a343c124e56160c2c78d198445ef03ec8eb704ff + lib/moderation_api/models/operations/getanalyticschannels_queryparam_range.rbi: + last_write_checksum: sha1:122da01b30c24e895ce972136b6dffcca7ba8eac + lib/moderation_api/models/operations/getanalyticschannels_range_response.rb: + last_write_checksum: sha1:b1522ecc3a80a9e4d2c630b269e24e7584b95e17 + lib/moderation_api/models/operations/getanalyticschannels_range_response.rbi: + last_write_checksum: sha1:c98a4e7b7f82baec2de85e3cd6ba1b3b7271c490 + lib/moderation_api/models/operations/getanalyticschannels_request.rb: + last_write_checksum: sha1:08b974a6ab3754efb6a10ab7f7d0853bca6661dd + lib/moderation_api/models/operations/getanalyticschannels_request.rbi: + last_write_checksum: sha1:4c219fa4630fbb965c65d4dc38f2e6e45d96130c + lib/moderation_api/models/operations/getanalyticschannels_response.rb: + last_write_checksum: sha1:152936592de24a4c45a0b825ee7aa5b5aae1729f + lib/moderation_api/models/operations/getanalyticschannels_response.rbi: + last_write_checksum: sha1:ecd5470711d98304fa61d58d6403579ec04b73d4 + lib/moderation_api/models/operations/getanalyticschannels_responsebody.rb: + last_write_checksum: sha1:837e98ce3eb9e69b8123a4a79f218b5304a803e2 + lib/moderation_api/models/operations/getanalyticschannels_responsebody.rbi: + last_write_checksum: sha1:a32c18a409eefdb70869992912206a1593eb0e53 + lib/moderation_api/models/operations/getanalyticspolicies_policy.rb: + last_write_checksum: sha1:04718f50561a5668d7247d0d1412b560552302c9 + lib/moderation_api/models/operations/getanalyticspolicies_policy.rbi: + last_write_checksum: sha1:3c9b0d97f001aa1c0138c6e9d0fb6ac6699042f7 + lib/moderation_api/models/operations/getanalyticspolicies_queryparam_range.rb: + last_write_checksum: sha1:ef9c0cb3162b8e7d0531fd66b9cb3f8ea9ead28a + lib/moderation_api/models/operations/getanalyticspolicies_queryparam_range.rbi: + last_write_checksum: sha1:1b9d1c1ecbaf2d21537ca4c936cf79a422cc1aae + lib/moderation_api/models/operations/getanalyticspolicies_range_response.rb: + last_write_checksum: sha1:e9632595ccbce9a8bb17e425b68c25fbe3d7b75e + lib/moderation_api/models/operations/getanalyticspolicies_range_response.rbi: + last_write_checksum: sha1:e5227293e2e0e9e8296ac476258496f2b39bc6ce + lib/moderation_api/models/operations/getanalyticspolicies_request.rb: + last_write_checksum: sha1:e3d27bded7ebd5a7833885ead1b4a9c41ed7a877 + lib/moderation_api/models/operations/getanalyticspolicies_request.rbi: + last_write_checksum: sha1:05b51bdf517e75bbe6f4a817f1ff6c78cf235005 + lib/moderation_api/models/operations/getanalyticspolicies_response.rb: + last_write_checksum: sha1:e886e1ffb69bb568c2740951f76f78a3ecfb1275 + lib/moderation_api/models/operations/getanalyticspolicies_response.rbi: + last_write_checksum: sha1:9ea879e9b40939c0ea311b5165fea37bf6445a6e + lib/moderation_api/models/operations/getanalyticspolicies_responsebody.rb: + last_write_checksum: sha1:0afa807527a60ae5fae626df9c9da71c729d8771 + lib/moderation_api/models/operations/getanalyticspolicies_responsebody.rbi: + last_write_checksum: sha1:614cec852fc2e1daa380b7e17c7bc3b39bf8e391 + lib/moderation_api/models/operations/getanalyticssummary_queryparam_range.rb: + last_write_checksum: sha1:04aa49f3b51dfa75e86c32c63e9b68938576cecb + lib/moderation_api/models/operations/getanalyticssummary_queryparam_range.rbi: + last_write_checksum: sha1:be8264c2c6bc42c383b4d5b368500d380b26653b + lib/moderation_api/models/operations/getanalyticssummary_range_response.rb: + last_write_checksum: sha1:2d7923ba26b53dff8a758f21832ea76dd8adc3e4 + lib/moderation_api/models/operations/getanalyticssummary_range_response.rbi: + last_write_checksum: sha1:a009841db808d0ced832dbcc1af495d7e92fa234 + lib/moderation_api/models/operations/getanalyticssummary_request.rb: + last_write_checksum: sha1:deee98833c568469033c80af69dd6dedb71444fa + lib/moderation_api/models/operations/getanalyticssummary_request.rbi: + last_write_checksum: sha1:33d0bc6658458cd234aee198b5a43539df8a0605 + lib/moderation_api/models/operations/getanalyticssummary_response.rb: + last_write_checksum: sha1:ac47bb9b50ad8db12c19de15766fd6240a590a45 + lib/moderation_api/models/operations/getanalyticssummary_response.rbi: + last_write_checksum: sha1:955e4be131c284760319ef3b2529e84dcae6d36f + lib/moderation_api/models/operations/getanalyticssummary_responsebody.rb: + last_write_checksum: sha1:d627c86a3b71ef35b0b9ba4ec083543f7e865b43 + lib/moderation_api/models/operations/getanalyticssummary_responsebody.rbi: + last_write_checksum: sha1:046939d098b2d5ac45440a558a96a33df3a4343a + lib/moderation_api/models/operations/getanalyticsvolumes_queryparam_range.rb: + last_write_checksum: sha1:d534d463a94cdbefe0b8eea9c47761f560daebf7 + lib/moderation_api/models/operations/getanalyticsvolumes_queryparam_range.rbi: + last_write_checksum: sha1:8dab359501e1d0940192a7a43bb89599e2b6de43 + lib/moderation_api/models/operations/getanalyticsvolumes_range_response.rb: + last_write_checksum: sha1:7a49f7daef5d6a3a5a521122791019e6a2fe19d9 + lib/moderation_api/models/operations/getanalyticsvolumes_range_response.rbi: + last_write_checksum: sha1:8fb255d481503d052f21bf00f44963dd9df62c5e + lib/moderation_api/models/operations/getanalyticsvolumes_request.rb: + last_write_checksum: sha1:d603a31b2e243674ba96d36ece2052313982bcc5 + lib/moderation_api/models/operations/getanalyticsvolumes_request.rbi: + last_write_checksum: sha1:03f78d3a6ac3a092699d8199a56ceb8711a842f2 + lib/moderation_api/models/operations/getanalyticsvolumes_response.rb: + last_write_checksum: sha1:2c8395df21458c5ad83c4534fd0ace208b67e456 + lib/moderation_api/models/operations/getanalyticsvolumes_response.rbi: + last_write_checksum: sha1:d126a66a0e55103f07a67194c63f1ac8274ca6a7 + lib/moderation_api/models/operations/getanalyticsvolumes_responsebody.rb: + last_write_checksum: sha1:35de8887c33fd901de82a8764812ea29666bf24a + lib/moderation_api/models/operations/getanalyticsvolumes_responsebody.rbi: + last_write_checksum: sha1:15c4d7ace4f6fafc168a6db061ff16da8503a4dc lib/moderation_api/models/operations/getauthor_request.rb: - last_write_checksum: sha1:ce67f1209125893fe60e15ce9734b2ccfa9854f7 + last_write_checksum: sha1:d7e6e0d78ed6b15162663ffccdafc88be7571ede lib/moderation_api/models/operations/getauthor_request.rbi: last_write_checksum: sha1:95b5b3e3490f09981497712109a857dbdeb69352 lib/moderation_api/models/operations/getauthor_response.rb: @@ -1397,16 +1763,8 @@ trackedFiles: last_write_checksum: sha1:742f592ecaffd9d8eb5454950955b8fd262b75ae lib/moderation_api/models/operations/getproject_response.rbi: last_write_checksum: sha1:58665f3b5316d7ddd3e75c63584aa5e350e7576f - lib/moderation_api/models/operations/getqueue_contenttype.rb: - last_write_checksum: sha1:27850722042b4e2ada96167aec59b2c61be0a479 - lib/moderation_api/models/operations/getqueue_contenttype.rbi: - last_write_checksum: sha1:c469a99b79ce904587ae87d3b46807a7bbe1a7d4 - lib/moderation_api/models/operations/getqueue_recommendationaction.rb: - last_write_checksum: sha1:7e5de8439843bf4815c641a898b4ca23134945d2 - lib/moderation_api/models/operations/getqueue_recommendationaction.rbi: - last_write_checksum: sha1:c954bc135e25e58683bed62e31de157fe586139a lib/moderation_api/models/operations/getqueue_request.rb: - last_write_checksum: sha1:bb1a07d7db19610b23e8db63da8d46a95f8790ca + last_write_checksum: sha1:d473865aca52d61bc7f20fc7f7e3669142f6df6a lib/moderation_api/models/operations/getqueue_request.rbi: last_write_checksum: sha1:6acb645e5d88c97807bc0975a0d01c76256410ac lib/moderation_api/models/operations/getqueue_response.rb: @@ -1414,15 +1772,11 @@ trackedFiles: lib/moderation_api/models/operations/getqueue_response.rbi: last_write_checksum: sha1:7ac069f5030357b19efc79f776e434d223e2ff4c lib/moderation_api/models/operations/getqueue_responsebody.rb: - last_write_checksum: sha1:0638a3bde7be72d3912b31d969f347e14eab7fd9 + last_write_checksum: sha1:f24c44e21b749730fe2b4e777efd27e97e233e48 lib/moderation_api/models/operations/getqueue_responsebody.rbi: last_write_checksum: sha1:0046e8d7a4d9b65f83cbc697d813a1dd0bd0b29a - lib/moderation_api/models/operations/getqueue_type.rb: - last_write_checksum: sha1:aa9b9220ec1669603f70c07568121223e06ef6cb - lib/moderation_api/models/operations/getqueue_type.rbi: - last_write_checksum: sha1:077545165e946578e697d7663bfd89d006f05f75 lib/moderation_api/models/operations/getqueuestats_request.rb: - last_write_checksum: sha1:5de733b214a6e71ce38a68489cfe42e8404914b2 + last_write_checksum: sha1:9cc6c9f5b6a67bc5d5ade2ee24cd9cf849aec40f lib/moderation_api/models/operations/getqueuestats_request.rbi: last_write_checksum: sha1:cfb5359880a18a56742dda21c9dd1e4900035905 lib/moderation_api/models/operations/getqueuestats_response.rb: @@ -1430,9 +1784,9 @@ trackedFiles: lib/moderation_api/models/operations/getqueuestats_response.rbi: last_write_checksum: sha1:592e8b81f46313f4f48035e3e8400649d955bd4f lib/moderation_api/models/operations/getqueuestats_responsebody.rb: - last_write_checksum: sha1:2386cac908d9c803ff53619a57c9b0a08fc3fe4a + last_write_checksum: sha1:3bf1ef51c927a82b9e9e81ce276c307db141ee0a lib/moderation_api/models/operations/getqueuestats_responsebody.rbi: - last_write_checksum: sha1:52b1283b6885d4a1a27396b7bee1ce0a9d966ace + last_write_checksum: sha1:df684ac32c84bea97e1f3a67f8edcee5244d515e lib/moderation_api/models/operations/getwebhook_eventtype.rb: last_write_checksum: sha1:ebd229aaab7bcc520b3ee229384d15d62d17c10d lib/moderation_api/models/operations/getwebhook_eventtype.rbi: @@ -1442,7 +1796,7 @@ trackedFiles: lib/moderation_api/models/operations/getwebhook_payloadversion.rbi: last_write_checksum: sha1:6b50974441d14d33f34e3737b7163330e8675b44 lib/moderation_api/models/operations/getwebhook_request.rb: - last_write_checksum: sha1:4da030ca28a75b12324a2ec724c9013edbbbc17e + last_write_checksum: sha1:a6ec1723373a9a220226496a95a78c488499dbdf lib/moderation_api/models/operations/getwebhook_request.rbi: last_write_checksum: sha1:1be6e7ee51b03784d3a26e3003d9eb1402401019 lib/moderation_api/models/operations/getwebhook_response.rb: @@ -1454,7 +1808,7 @@ trackedFiles: lib/moderation_api/models/operations/getwebhook_responsebody.rbi: last_write_checksum: sha1:5655f9ab43c4c522fb653dd1883bbb56f2c3d9cb lib/moderation_api/models/operations/getwebhooksecret_request.rb: - last_write_checksum: sha1:08e6ae64fe305548120076138d7354d3e8781006 + last_write_checksum: sha1:51835ecf39593b4348f6044aa726eaf04b473930 lib/moderation_api/models/operations/getwebhooksecret_request.rbi: last_write_checksum: sha1:75d65f809d33b94299ec409df3781eb4d9cfdede lib/moderation_api/models/operations/getwebhooksecret_response.rb: @@ -1466,7 +1820,7 @@ trackedFiles: lib/moderation_api/models/operations/getwebhooksecret_responsebody.rbi: last_write_checksum: sha1:252bd188afed0a23c0f5cbb9339d14d905dbec1c lib/moderation_api/models/operations/getwordlist_request.rb: - last_write_checksum: sha1:694da865e0e4bba4a795f8f04de653e9c4d469f0 + last_write_checksum: sha1:e88049660658b3a9c7e811e72be285932f88c73d lib/moderation_api/models/operations/getwordlist_request.rbi: last_write_checksum: sha1:1fa9f26e488a8bec156ab52ae7d7b85f5cedeae3 lib/moderation_api/models/operations/getwordlist_response.rb: @@ -1478,7 +1832,7 @@ trackedFiles: lib/moderation_api/models/operations/getwordlist_responsebody.rbi: last_write_checksum: sha1:dd7cb338ff0927708f3a523f3bd0e487f056b975 lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb: - last_write_checksum: sha1:3724b2f947d2925431d5655022442ccceee65a78 + last_write_checksum: sha1:15104dbd2d16768fa24f6f98126a57fba67958cd lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rbi: last_write_checksum: sha1:d3681a5f35da54bde86e69b277b0db35a576b113 lib/moderation_api/models/operations/getwordlistembeddingstatus_response.rb: @@ -1541,10 +1895,10 @@ trackedFiles: last_write_checksum: sha1:bcc77ba22cd729fd5555347267dbead601d60c43 lib/moderation_api/models/operations/insight.rbi: last_write_checksum: sha1:a83ac42a83389b6b85364edd536b2aecebaed387 - lib/moderation_api/models/operations/isflagged.rb: - last_write_checksum: sha1:292a325ffbd9a1199ca7b787702450fc5e68bcc7 - lib/moderation_api/models/operations/isflagged.rbi: - last_write_checksum: sha1:3ccad3ef23f6acc93164bf0670401d2701559e48 + lib/moderation_api/models/operations/label.rb: + last_write_checksum: sha1:d15dc906b31fd5b05f6e55ae0fbb5233565aecf4 + lib/moderation_api/models/operations/label.rbi: + last_write_checksum: sha1:0a8ead3a1e7230dfef968b6fd262c37ff917cecf lib/moderation_api/models/operations/language_insight.rb: last_write_checksum: sha1:2321adc5fca35866046b419d7f48a6bc8d6e308b lib/moderation_api/models/operations/language_insight.rbi: @@ -1566,7 +1920,7 @@ trackedFiles: lib/moderation_api/models/operations/listactions_queuebehaviour.rbi: last_write_checksum: sha1:d6764692ddbd8f19451e8a1c08f44266b46b2ec3 lib/moderation_api/models/operations/listactions_request.rb: - last_write_checksum: sha1:b8d3fc8686d609b3541f8ecff7d6698ae8769734 + last_write_checksum: sha1:10cabb24402a586d53b37d9446bfaf1a3b1de341 lib/moderation_api/models/operations/listactions_request.rbi: last_write_checksum: sha1:96de8eb3f442d4738b09d843882e4bd8773669f3 lib/moderation_api/models/operations/listactions_response.rb: @@ -1582,9 +1936,9 @@ trackedFiles: lib/moderation_api/models/operations/listactions_type.rbi: last_write_checksum: sha1:66c5ffe83807695824181754cf0d2fe709659f99 lib/moderation_api/models/operations/listauthors_request.rb: - last_write_checksum: sha1:e7c2b180302a8bbb0c1ead32c24abdc8386988ae + last_write_checksum: sha1:7add1f5d236fb4e96edde5d3648129b86a36c0fe lib/moderation_api/models/operations/listauthors_request.rbi: - last_write_checksum: sha1:f20ad14b2c5d195c9efb331f310444c2fde9b7aa + last_write_checksum: sha1:e6beac3acb662f2f508f6a0e05b8b02842b8cd92 lib/moderation_api/models/operations/listauthors_response.rb: last_write_checksum: sha1:5cfcfb662f34f24cd6ef58bead5d7a575570be65 lib/moderation_api/models/operations/listauthors_response.rbi: @@ -1593,10 +1947,6 @@ trackedFiles: last_write_checksum: sha1:8bb151952da2daed0fc4d5a75802816dc7830b61 lib/moderation_api/models/operations/listauthors_responsebody.rbi: last_write_checksum: sha1:345e089adc3156cd22abe353c1a0ef35de224db9 - lib/moderation_api/models/operations/listauthors_sortdirection.rb: - last_write_checksum: sha1:3c8e607ea5639d8ca4800cb826d60daf6540ddca - lib/moderation_api/models/operations/listauthors_sortdirection.rbi: - last_write_checksum: sha1:8a3ba1e652ea22bb15f4bdee413087b88664e652 lib/moderation_api/models/operations/listchannels_request.rb: last_write_checksum: sha1:3fbbc71854b7cc8b9148e21b7c2bd204a0f10d81 lib/moderation_api/models/operations/listchannels_request.rbi: @@ -1621,38 +1971,30 @@ trackedFiles: last_write_checksum: sha1:66bc1a4f4f96d504956d5915f95f70de4d12dabe lib/moderation_api/models/operations/listprojects_responsebody.rbi: last_write_checksum: sha1:086aa49b3877f7f03db28e4ba53dc4a0e5e77560 - lib/moderation_api/models/operations/listqueueitems_action.rb: - last_write_checksum: sha1:0716fad123e56f3df10f23089e107e4f036e187c - lib/moderation_api/models/operations/listqueueitems_action.rbi: - last_write_checksum: sha1:52f90ec4a1333099270063c3588f9dd1261775b7 - lib/moderation_api/models/operations/listqueueitems_data.rb: - last_write_checksum: sha1:c9ecbb98123d298e5b0dc87508b2f426e1d693e3 - lib/moderation_api/models/operations/listqueueitems_data.rbi: - last_write_checksum: sha1:0bafaf656618270323373041ba0c51301d72bdca - lib/moderation_api/models/operations/listqueueitems_label.rb: - last_write_checksum: sha1:848b005d31d3079ab16ffa638b9392705dc28669 - lib/moderation_api/models/operations/listqueueitems_label.rbi: - last_write_checksum: sha1:83d777ef7ae4c7839fc6138384dbbb56f0fd3e08 lib/moderation_api/models/operations/listqueueitems_request.rb: - last_write_checksum: sha1:1b691b3b6bdf2fcdb5d9a12e912bb8a1ee558587 + last_write_checksum: sha1:dfd0b57162ff75b3e67b3365bcfa475498e0a788 lib/moderation_api/models/operations/listqueueitems_request.rbi: - last_write_checksum: sha1:fa8af0ac6d0a61ef7e56a3e0ffee21b48758c09e + last_write_checksum: sha1:1c5a32e91e7902f71ed38f9939ee539124d83f56 lib/moderation_api/models/operations/listqueueitems_response.rb: last_write_checksum: sha1:1dbdccc4868d6177bfd8d85b16ade10ceca76f7f lib/moderation_api/models/operations/listqueueitems_response.rbi: last_write_checksum: sha1:286a580b1403f6eb19727f52fdafb1d8e484dd26 lib/moderation_api/models/operations/listqueueitems_responsebody.rb: - last_write_checksum: sha1:da3f8e3585f94a6c8080b1fc4e805f4e9d0ef655 + last_write_checksum: sha1:c4837478ad24eed742d91675a57b6da8e6e3610b lib/moderation_api/models/operations/listqueueitems_responsebody.rbi: last_write_checksum: sha1:7c9215e07da136ebf95a98f6780c681727875cf2 - lib/moderation_api/models/operations/listqueueitems_sortdirection.rb: - last_write_checksum: sha1:21aef73dfeed3e90b4d827e4f84cd8c343629f49 - lib/moderation_api/models/operations/listqueueitems_sortdirection.rbi: - last_write_checksum: sha1:95773e200f152bf72ee802385b4e31c897391db0 - lib/moderation_api/models/operations/listqueueitems_status.rb: - last_write_checksum: sha1:2c11c87320efe5a695fcd1150991f09cd8fe52a3 - lib/moderation_api/models/operations/listqueueitems_status.rbi: - last_write_checksum: sha1:9bb588ba2eeaecf8f72f14f078417c3b983d6e5d + lib/moderation_api/models/operations/listqueues_request.rb: + last_write_checksum: sha1:66d16d8ce19bfa450f54cf386449531f5578f8a5 + lib/moderation_api/models/operations/listqueues_request.rbi: + last_write_checksum: sha1:41a53d5a0003038ea8f56568b8d16b7b2d3063c6 + lib/moderation_api/models/operations/listqueues_response.rb: + last_write_checksum: sha1:d9fec4683f4cb917ccef973574c804a4edfa4bb7 + lib/moderation_api/models/operations/listqueues_response.rbi: + last_write_checksum: sha1:299af52b6d8a267c3cf95cbe70e3949b3db8766a + lib/moderation_api/models/operations/listqueues_responsebody.rb: + last_write_checksum: sha1:c8bfcd06ca2c3336e9f919891d80798703b25194 + lib/moderation_api/models/operations/listqueues_responsebody.rbi: + last_write_checksum: sha1:1d57475a146919b8b71aaf550a41f0d9879b2d53 lib/moderation_api/models/operations/listwebhooks_data.rb: last_write_checksum: sha1:090c5e0317c4b2d5578d90bf8b327845cc2202fa lib/moderation_api/models/operations/listwebhooks_data.rbi: @@ -1666,7 +2008,7 @@ trackedFiles: lib/moderation_api/models/operations/listwebhooks_payloadversion.rbi: last_write_checksum: sha1:c2e21de84fb31da5f26358faac088e192dd9d97c lib/moderation_api/models/operations/listwebhooks_request.rb: - last_write_checksum: sha1:98a4b3219d6c5cac1b92f0627ec912c81792b3ec + last_write_checksum: sha1:595c930e0dd88b76ac9ec22f7e27c5126ac5ae27 lib/moderation_api/models/operations/listwebhooks_request.rbi: last_write_checksum: sha1:32acd2c709bfd051fb2a9287d25dbebc8a465a37 lib/moderation_api/models/operations/listwebhooks_response.rb: @@ -1682,7 +2024,7 @@ trackedFiles: lib/moderation_api/models/operations/listwordlists_data.rbi: last_write_checksum: sha1:af42bf5e255857f2eb738670969b63c1cf5df9cb lib/moderation_api/models/operations/listwordlists_request.rb: - last_write_checksum: sha1:80e16e9366dc16d5d77886f35be6ab0a1a6fb2c3 + last_write_checksum: sha1:041924d22c30be76d379b97467444d75303c9e3a lib/moderation_api/models/operations/listwordlists_request.rbi: last_write_checksum: sha1:3d6e197819c666694c217269e305d14da5099651 lib/moderation_api/models/operations/listwordlists_response.rb: @@ -1705,10 +2047,6 @@ trackedFiles: last_write_checksum: sha1:5e958e95ee4d22ec6e7b1863ef2688158f45151f lib/moderation_api/models/operations/matched_rule.rbi: last_write_checksum: sha1:cf7529e1270941ef1b1de6fdf0847f1413ef6def - lib/moderation_api/models/operations/mediatype.rb: - last_write_checksum: sha1:acd09b23b6ac7995caf3e688fd9cc0f8730c7b27 - lib/moderation_api/models/operations/mediatype.rbi: - last_write_checksum: sha1:e50f22220fdb2659b4029c837574bd19b90f6f74 lib/moderation_api/models/operations/meta.rb: last_write_checksum: sha1:85253b83e34e6d8e926859c1768aff206c5f9385 lib/moderation_api/models/operations/meta.rbi: @@ -1717,10 +2055,6 @@ trackedFiles: last_write_checksum: sha1:00c5da68261f22bd2148c22aa160776460a945a0 lib/moderation_api/models/operations/meta_status.rbi: last_write_checksum: sha1:ce915dd40454838de0ab7f346c810abff3203a4f - lib/moderation_api/models/operations/metadatafilter.rb: - last_write_checksum: sha1:9c653f80f8d0088d6a195a8d4f6c15010f14c5b3 - lib/moderation_api/models/operations/metadatafilter.rbi: - last_write_checksum: sha1:3a9f220bac160938174a18c22f84def23e6ae40b lib/moderation_api/models/operations/metatype.rb: last_write_checksum: sha1:7b1037d7c18e66f31eac5633380376a8a38cb837 lib/moderation_api/models/operations/metatype.rbi: @@ -1753,14 +2087,14 @@ trackedFiles: last_write_checksum: sha1:80a9ae7fd8d58b4219a05a14bd672a4c92bfefb9 lib/moderation_api/models/operations/policy_request.rbi: last_write_checksum: sha1:0d95f3f2100a2c855f8d8a5129d1646e25e62dae - lib/moderation_api/models/operations/policy_response.rb: - last_write_checksum: sha1:1a7685017a3129cf4cd023b9122b42f6157e0b2d - lib/moderation_api/models/operations/policy_response.rbi: - last_write_checksum: sha1:02aecee4d8d450b5d647be29629f27b7f0789b71 lib/moderation_api/models/operations/political.rb: last_write_checksum: sha1:69fb50a50b1f499cf8930e4b380ed95fd53c1754 lib/moderation_api/models/operations/political.rbi: last_write_checksum: sha1:7370ef4479a98c5699b32b4b9f4048fdbb9bdf15 + lib/moderation_api/models/operations/previousperiod.rb: + last_write_checksum: sha1:d412b3fe2781b9df6ad31646d97453b137fc3e05 + lib/moderation_api/models/operations/previousperiod.rbi: + last_write_checksum: sha1:98da1e8583cedb5c76faec7672130bf05cdfb6a1 lib/moderation_api/models/operations/profanity.rb: last_write_checksum: sha1:6baa89c05b003a8dd46216fbb55b51df38993a0f lib/moderation_api/models/operations/profanity.rbi: @@ -1769,10 +2103,6 @@ trackedFiles: last_write_checksum: sha1:dba40574091ce031aeb2266baf6b1c695ac74e2e lib/moderation_api/models/operations/promotion.rbi: last_write_checksum: sha1:dc22e906ea5dbb88989fdcfc509228a0c979fc70 - lib/moderation_api/models/operations/queue.rb: - last_write_checksum: sha1:ce7ac1135b6f0b1ac52e7935e069f912fb575ed1 - lib/moderation_api/models/operations/queue.rbi: - last_write_checksum: sha1:e84b3dd15116bebf018b74f8fcde2eda821e3dc5 lib/moderation_api/models/operations/reason_code.rb: last_write_checksum: sha1:18ec89ea39b92e87649c52eee54c72347b04a5c5 lib/moderation_api/models/operations/reason_code.rbi: @@ -1782,7 +2112,7 @@ trackedFiles: lib/moderation_api/models/operations/reason_code_enum.rbi: last_write_checksum: sha1:b8bb8e9df36accaf7d3856b586c46d7f68bb7455 lib/moderation_api/models/operations/recommendation.rb: - last_write_checksum: sha1:e5231948d3f23620e5c7d18be7ddb5eacb7429d2 + last_write_checksum: sha1:c162f92b4453f05e10e5f8cff275714bc6f390bc lib/moderation_api/models/operations/recommendation.rbi: last_write_checksum: sha1:20a88cdefbd0d8599acb625e728c9ce459fb2b27 lib/moderation_api/models/operations/religion.rb: @@ -1790,7 +2120,7 @@ trackedFiles: lib/moderation_api/models/operations/religion.rbi: last_write_checksum: sha1:879ecea96ee34baca3a0cf1d8c5f1f71cd09c42f lib/moderation_api/models/operations/removewordlistwords_request.rb: - last_write_checksum: sha1:673da90836382c4575557a7dd9ab68ad8c4029f9 + last_write_checksum: sha1:250323bd0aeeed54252c226d8a4089d9386847fb lib/moderation_api/models/operations/removewordlistwords_request.rbi: last_write_checksum: sha1:5c5d2de1447ac486aae455b77f2ade25d2b2f24a lib/moderation_api/models/operations/removewordlistwords_response.rb: @@ -1802,29 +2132,45 @@ trackedFiles: lib/moderation_api/models/operations/removewordlistwords_responsebody.rbi: last_write_checksum: sha1:356759040681697022af0658456acc63000fd0dc lib/moderation_api/models/operations/resolvequeueitem_request.rb: - last_write_checksum: sha1:4c35076b641fbbf1a97686f55d18c2db197a6c26 + last_write_checksum: sha1:5984f5dd964df63fb3aa76109807784036fcf295 lib/moderation_api/models/operations/resolvequeueitem_request.rbi: - last_write_checksum: sha1:5e192c3d41533fa5ee5002ad512bac8562be6197 - lib/moderation_api/models/operations/resolvequeueitem_requestbody.rb: - last_write_checksum: sha1:b4869b07ac0e9f8d146828388cab29da8b4cb40e - lib/moderation_api/models/operations/resolvequeueitem_requestbody.rbi: - last_write_checksum: sha1:b848b26f1c0c45181ddee9d6c4ade9c6495b2139 + last_write_checksum: sha1:bc1b789a4e4c0690b5f05a3f38f61a0dff2d4c40 lib/moderation_api/models/operations/resolvequeueitem_response.rb: last_write_checksum: sha1:d7ba70e342c3abc851dea6a3032a8c82b32776f9 lib/moderation_api/models/operations/resolvequeueitem_response.rbi: last_write_checksum: sha1:d6fe166955e11d85c1acd2e5145e33f73c9852d0 lib/moderation_api/models/operations/resolvequeueitem_responsebody.rb: - last_write_checksum: sha1:feb1fa0eeb71198d56cafd9ef27875f747f3617a + last_write_checksum: sha1:abaaf69a065511ec895904ac807d1ba7d7709c1e lib/moderation_api/models/operations/resolvequeueitem_responsebody.rbi: - last_write_checksum: sha1:54d3b9438f58a8bffce4f0c453529cc49be5552c + last_write_checksum: sha1:d3f3b97a01b9eedc83958eb08b18870b0d049b85 + lib/moderation_api/models/operations/resolvequeueitems_request.rb: + last_write_checksum: sha1:e16e8123383b42220d21da9da829b4567de780ac + lib/moderation_api/models/operations/resolvequeueitems_request.rbi: + last_write_checksum: sha1:9438390ff81d23f39dfcd06665930b9333e9f04e + lib/moderation_api/models/operations/resolvequeueitems_requestbody.rb: + last_write_checksum: sha1:708062055b9cd22d74ff5686d93ff490eaf431f1 + lib/moderation_api/models/operations/resolvequeueitems_requestbody.rbi: + last_write_checksum: sha1:b3dcb46f20093268b8a1921cf7ae3eb7a6d74e97 + lib/moderation_api/models/operations/resolvequeueitems_response.rb: + last_write_checksum: sha1:b0c16973f17b8a8882d911930c4d2b8c6bad6d93 + lib/moderation_api/models/operations/resolvequeueitems_response.rbi: + last_write_checksum: sha1:3fde7d2df48d7acf98ffb330e07dd0666a467e8c + lib/moderation_api/models/operations/resolvequeueitems_responsebody.rb: + last_write_checksum: sha1:d5f0c86021fa713abb263a06e2424ecb48aabdf3 + lib/moderation_api/models/operations/resolvequeueitems_responsebody.rbi: + last_write_checksum: sha1:779e79702cfdf776af2e4ad89ab0690b90bbfe90 lib/moderation_api/models/operations/respect_insight.rb: last_write_checksum: sha1:c1d98e49a2613384ed077fb7a1a3990dedadf81f lib/moderation_api/models/operations/respect_insight.rbi: last_write_checksum: sha1:483c04d8cc88dc02461c275ba4d594535cc50582 lib/moderation_api/models/operations/reviewstats.rb: - last_write_checksum: sha1:e3df90b4b61ede333bd652eb230dbee6cd24aba7 + last_write_checksum: sha1:7568c3fa5ff5f0339cea7d96a7b0867fa3a3fe95 lib/moderation_api/models/operations/reviewstats.rbi: - last_write_checksum: sha1:f4f1a2b7aa7398fc52e97996678f7d824072b11a + last_write_checksum: sha1:76ce8c95ae63eea568c944ad674977e868eff2ec + lib/moderation_api/models/operations/rule.rb: + last_write_checksum: sha1:f72c9162e0ef8dc7acf7e69397a86aaf3c17da12 + lib/moderation_api/models/operations/rule.rbi: + last_write_checksum: sha1:53d1ac62862f1e7e663ee4c0635ce50364a7bbe0 lib/moderation_api/models/operations/scores.rb: last_write_checksum: sha1:a9842bfc24dd3f9db22739a2ae31be7023fba8ae lib/moderation_api/models/operations/scores.rbi: @@ -1861,32 +2207,40 @@ trackedFiles: last_write_checksum: sha1:b06362c298cf15edbf1db019e1672d6468b52ada lib/moderation_api/models/operations/signals_response.rbi: last_write_checksum: sha1:940bd85b83ca55cde1d96a9ebb6b8b48505cc75f + lib/moderation_api/models/operations/sort.rb: + last_write_checksum: sha1:463f524ac3587870a9ca62dc74aaf97d5b46c1b4 + lib/moderation_api/models/operations/sort.rbi: + last_write_checksum: sha1:b2e3ffdcf17a1fd7b8577ddd0c8c463e5a41ee95 lib/moderation_api/models/operations/sortby.rb: - last_write_checksum: sha1:149e53d9b44fdba00fe3b9564a0bbfe48c87c096 + last_write_checksum: sha1:d89e3c82c7880e7eaf2858f03759f447213aef35 lib/moderation_api/models/operations/sortby.rbi: last_write_checksum: sha1:72f9e71673cbb31e677d6f5a2f4e4809b42d7eee - lib/moderation_api/models/operations/sortfield.rb: - last_write_checksum: sha1:f15cd97b1fcd4be016ce93398412892a852ea800 - lib/moderation_api/models/operations/sortfield.rbi: - last_write_checksum: sha1:4bc422e5253ff1e111742d265831b1980ced2eb9 + lib/moderation_api/models/operations/sortdirection.rb: + last_write_checksum: sha1:879efd26a2d6eacb14efec6727884cd0cad6d742 + lib/moderation_api/models/operations/sortdirection.rbi: + last_write_checksum: sha1:ee699fa305882aac1f27359c82b07a4d0faaa9ca + lib/moderation_api/models/operations/source.rb: + last_write_checksum: sha1:0095547f8e2b8cb1ba5c69abe9dcfa9776afd6fb + lib/moderation_api/models/operations/source.rbi: + last_write_checksum: sha1:311ab3bec65f44f9e72ed26582c64f5178662546 lib/moderation_api/models/operations/spam.rb: last_write_checksum: sha1:485e38cfed615e41d3360810c4c47869c200ab90 lib/moderation_api/models/operations/spam.rbi: last_write_checksum: sha1:952869b546993fffd43baff63033fec74e2222f9 - lib/moderation_api/models/operations/submitcontent_label.rb: - last_write_checksum: sha1:b24c7a6a41f3c8c7eab9065e3ca41b2cdf3e2fd1 - lib/moderation_api/models/operations/submitcontent_label.rbi: - last_write_checksum: sha1:48821b6994625e619f429dc6772c7385fa934234 - lib/moderation_api/models/operations/submitcontent_recommendation_action.rb: - last_write_checksum: sha1:24f306a3d08adf91246b0a75ed7b3481ea1330a7 - lib/moderation_api/models/operations/submitcontent_recommendation_action.rbi: - last_write_checksum: sha1:5d19a64d3e146b8ec755d4cc48f0dd3a8753c5b6 + lib/moderation_api/models/operations/submitcontent_author.rb: + last_write_checksum: sha1:5281bddc4bbcf490b143965f0a88f6b7a4cf777f + lib/moderation_api/models/operations/submitcontent_author.rbi: + last_write_checksum: sha1:90b9b6b132cdad7bb13a7c579dff5e08e81b8b4e + lib/moderation_api/models/operations/submitcontent_policy_response.rb: + last_write_checksum: sha1:e16117679ef4c4d37084f9b1b6ddc5e375d9de44 + lib/moderation_api/models/operations/submitcontent_policy_response.rbi: + last_write_checksum: sha1:674a365a1dd01b2f18c3ff988099422dd04f17f5 lib/moderation_api/models/operations/submitcontent_request.rb: - last_write_checksum: sha1:1f2e3b87c7199c321d498f3b5a5ce68626a143df + last_write_checksum: sha1:63bc875126bfa2d48c6de7c6178f15b16fea9a3e lib/moderation_api/models/operations/submitcontent_request.rbi: last_write_checksum: sha1:371659a98c66d09b055e065cb49b37173f269f9d lib/moderation_api/models/operations/submitcontent_requestbody.rb: - last_write_checksum: sha1:effc5149aa7426b873fc9e1019d6a90925d3a080 + last_write_checksum: sha1:7c04f001f16d372b46888937c7605c38c26dd590 lib/moderation_api/models/operations/submitcontent_requestbody.rbi: last_write_checksum: sha1:27e861b58d9151813aec8e458248467b68864944 lib/moderation_api/models/operations/submitcontent_response.rb: @@ -1894,7 +2248,7 @@ trackedFiles: lib/moderation_api/models/operations/submitcontent_response.rbi: last_write_checksum: sha1:0492b2ded4b334a3d9fe57d6d32a7b374ff00bbc lib/moderation_api/models/operations/submitcontent_responsebody.rb: - last_write_checksum: sha1:eb4cfbf580fb5333aea1492553daf279db1efcff + last_write_checksum: sha1:bd0dd24084a1a6a6ea06c84429a9fbfc306bf4a8 lib/moderation_api/models/operations/submitcontent_responsebody.rbi: last_write_checksum: sha1:e0fabb1cacec37c365400b79867ae09b48112717 lib/moderation_api/models/operations/text_request.rb: @@ -1913,18 +2267,18 @@ trackedFiles: last_write_checksum: sha1:a5a7c5c54264e034d9c9935710e5843dfc4faac9 lib/moderation_api/models/operations/tobacco.rbi: last_write_checksum: sha1:9ea13e6ff7f9b9fe8ab4de91c1305a20928e8244 - lib/moderation_api/models/operations/topaction.rb: - last_write_checksum: sha1:c56f1a509d90cddccb32ae5d5aecfc830ef6f223 - lib/moderation_api/models/operations/topaction.rbi: - last_write_checksum: sha1:a52597ca3e1fff736ee9a7e4baa0b88f94787887 lib/moderation_api/models/operations/topic.rb: last_write_checksum: sha1:25ed0d7ade8b598a0d1fa73606072643f3b25aad lib/moderation_api/models/operations/topic.rbi: last_write_checksum: sha1:95ec31c3964a81205e4e8908367ce7cb946bb455 lib/moderation_api/models/operations/topreviewer.rb: - last_write_checksum: sha1:e43c294cd28184439d957404b087e43e812b96e2 + last_write_checksum: sha1:0ee3dd130aedbdf572c12a594d113125c91e3a45 lib/moderation_api/models/operations/topreviewer.rbi: - last_write_checksum: sha1:40ff8c42484b5a26a64715048005ad95ea3e513c + last_write_checksum: sha1:c028aa020c7f537fa4b4fa72b94e2804501b2c96 + lib/moderation_api/models/operations/totals.rb: + last_write_checksum: sha1:a98596a889c4a6c0960bfddc09f507d23c6ff47f + lib/moderation_api/models/operations/totals.rbi: + last_write_checksum: sha1:cd2e67b31600fff67495db1ea3dee8833bc6e4ae lib/moderation_api/models/operations/toxicity.rb: last_write_checksum: sha1:ef7d39491211cf583f145bf73c73eaedd0f37f0c lib/moderation_api/models/operations/toxicity.rbi: @@ -1934,9 +2288,9 @@ trackedFiles: lib/moderation_api/models/operations/transcriptionquality.rbi: last_write_checksum: sha1:9f3613403af81df0fb32b103549c3a800225742f lib/moderation_api/models/operations/trends.rb: - last_write_checksum: sha1:c1718c068b971d09c3d1c9e2d2c715cd25268c75 + last_write_checksum: sha1:c36f0f79ce649c16d70fdb59432d2cf4f2e0ebee lib/moderation_api/models/operations/trends.rbi: - last_write_checksum: sha1:17292713470a7312a7357351e10c7dfacd3fd009 + last_write_checksum: sha1:4d497f4b433596df7f4ec0b916084e12c877eb20 lib/moderation_api/models/operations/trust_level.rb: last_write_checksum: sha1:c059f420bb935dfe26e632b2f5d98ffb7139264b lib/moderation_api/models/operations/trust_level.rbi: @@ -1946,21 +2300,21 @@ trackedFiles: lib/moderation_api/models/operations/unicode_spoofing.rbi: last_write_checksum: sha1:7656bced8fbc58bd5d5acd35faf840f724c02f2f lib/moderation_api/models/operations/unresolvequeueitem_request.rb: - last_write_checksum: sha1:141b913c0998aaadcce96428c572c04ddd8333cd + last_write_checksum: sha1:05021b63f4b03cb2c9760b6e2cba101dd073b891 lib/moderation_api/models/operations/unresolvequeueitem_request.rbi: - last_write_checksum: sha1:fc8381c7576bee1f35c0f6d80b8b96bec161e843 - lib/moderation_api/models/operations/unresolvequeueitem_requestbody.rb: - last_write_checksum: sha1:5abd72cc8d7303023982e8ba5815e58b6170c071 - lib/moderation_api/models/operations/unresolvequeueitem_requestbody.rbi: - last_write_checksum: sha1:ff251d771ffcd731b5a3b7d0315a6163d0b44bba + last_write_checksum: sha1:ab56910c197bef8ee566e1e2dd7f4ae6e8947139 lib/moderation_api/models/operations/unresolvequeueitem_response.rb: last_write_checksum: sha1:ae8032f3b043c7921c63329e0e4eaf77186e0a45 lib/moderation_api/models/operations/unresolvequeueitem_response.rbi: last_write_checksum: sha1:9f38a0871546343af346d4bc6cc2e8426cc5287d lib/moderation_api/models/operations/unresolvequeueitem_responsebody.rb: - last_write_checksum: sha1:592f673944089e616126996080191df6aa87fe43 + last_write_checksum: sha1:f1f9acf28aca20c81e4e44091310f80f40b8663c lib/moderation_api/models/operations/unresolvequeueitem_responsebody.rbi: last_write_checksum: sha1:a1306d5c1ced8b55071685fbf4346b9cc76698fa + lib/moderation_api/models/operations/unresolvequeueitem_status.rb: + last_write_checksum: sha1:235b5789fbc2064a4b9ee8857197d53ad1c0bfe2 + lib/moderation_api/models/operations/unresolvequeueitem_status.rbi: + last_write_checksum: sha1:57c341cf032e716fcb46a3ea9977392d6c2e3e88 lib/moderation_api/models/operations/updateaction_position_request.rb: last_write_checksum: sha1:faff2a83b619c39bef97092632139631a74b2b75 lib/moderation_api/models/operations/updateaction_position_request.rbi: @@ -1986,7 +2340,7 @@ trackedFiles: lib/moderation_api/models/operations/updateaction_queuebehaviour_response.rbi: last_write_checksum: sha1:fcf4ef617b2df643481b62f4f12bdfdbb6ad85bf lib/moderation_api/models/operations/updateaction_request.rb: - last_write_checksum: sha1:9f1fb217dca8e0aacd75184ba66146ea96f1394a + last_write_checksum: sha1:67593af418ae9a16edeb7bf9596bfebee71feb2f lib/moderation_api/models/operations/updateaction_request.rbi: last_write_checksum: sha1:01a5c57caeced31d14de9b45f035c8c3d2d45bb3 lib/moderation_api/models/operations/updateaction_requestbody.rb: @@ -2014,7 +2368,7 @@ trackedFiles: lib/moderation_api/models/operations/updateauthor_metadata.rbi: last_write_checksum: sha1:7ca981866b53c4f7d35053bb4364138553074e25 lib/moderation_api/models/operations/updateauthor_request.rb: - last_write_checksum: sha1:9af165fe1ae9014126444f608266933fd0438335 + last_write_checksum: sha1:593f019d6a5ab89726062adaca2ad87bdcbb1dd4 lib/moderation_api/models/operations/updateauthor_request.rbi: last_write_checksum: sha1:31ee44478048914ff07ec9f0ca465e2a3a1ba075 lib/moderation_api/models/operations/updateauthor_requestbody.rb: @@ -2066,7 +2420,7 @@ trackedFiles: lib/moderation_api/models/operations/updatewebhook_payloadversion.rbi: last_write_checksum: sha1:e290a3d66acbb9d0e7222ad1a8c553dded8dc137 lib/moderation_api/models/operations/updatewebhook_request.rb: - last_write_checksum: sha1:183b29459951538b7695284901d915d2b7cee6e8 + last_write_checksum: sha1:7d71c6affc87fd1c1b350628d3b4526be1be18ec lib/moderation_api/models/operations/updatewebhook_request.rbi: last_write_checksum: sha1:57935796ee6cfc633d8ac0518084580b693f3728 lib/moderation_api/models/operations/updatewebhook_requestbody.rb: @@ -2082,11 +2436,11 @@ trackedFiles: lib/moderation_api/models/operations/updatewebhook_responsebody.rbi: last_write_checksum: sha1:64c63cab1792f0b0338902ba2956315e447b1e83 lib/moderation_api/models/operations/updatewordlist_request.rb: - last_write_checksum: sha1:f5b84285d3aabf8e69d804e523bce35c9543e6f7 + last_write_checksum: sha1:80ca772af1af45e4d2355e18b3f02297f5505996 lib/moderation_api/models/operations/updatewordlist_request.rbi: last_write_checksum: sha1:d43f6585589b790ee86d04f7d1a979fdc9e1bdd8 lib/moderation_api/models/operations/updatewordlist_requestbody.rb: - last_write_checksum: sha1:7ec0910e339404fc82c78efd7b67dc0fde58e22e + last_write_checksum: sha1:e8c749fa507669a80ab137ee228df080aaf5fe40 lib/moderation_api/models/operations/updatewordlist_requestbody.rbi: last_write_checksum: sha1:ec8647cb9817bf2a438f8842f872f6e372f33763 lib/moderation_api/models/operations/updatewordlist_response.rb: @@ -2125,26 +2479,26 @@ trackedFiles: last_write_checksum: sha1:4d35b33ce7a1fba38d88eef3f967a80228c11285 lib/moderation_api/models/operations/violence.rbi: last_write_checksum: sha1:6dc6dbf9b319062d132a04d7574daf59e44c096f + lib/moderation_api/models/operations/volume.rb: + last_write_checksum: sha1:8488fef784506eb4de52776d97c9f9240b38541c + lib/moderation_api/models/operations/volume.rbi: + last_write_checksum: sha1:73d4e5c723046002bdd0b120e7dbb6ea7cfc61a1 lib/moderation_api/models/operations/weapons.rb: last_write_checksum: sha1:909a3a92cae7ed09ce11e8b1f34c6de0e1f76350 lib/moderation_api/models/operations/weapons.rbi: last_write_checksum: sha1:4364de74124b139535fb707c2adc59b643a8aa40 - lib/moderation_api/models/operations/withinunit.rb: - last_write_checksum: sha1:6b4b0476c16d04d3939fb3565ad6fb644b5caad8 - lib/moderation_api/models/operations/withinunit.rbi: - last_write_checksum: sha1:f9b1959cccd494af9434c1f4645a6a5042f0733d lib/moderation_api/moderationapi.rb: - last_write_checksum: sha1:fddb1b1ea02048b98a9d7c9db22c8e9fc87cba49 + last_write_checksum: sha1:d5e263282892850a609fae581962e68453b55f40 lib/moderation_api/projects.rb: - last_write_checksum: sha1:1257d22a0c8172739041b3f86fa36a9347d747e5 + last_write_checksum: sha1:6f991dc6452fc24dc62a44eab0278bf9d55a7c11 lib/moderation_api/queue.rb: - last_write_checksum: sha1:9bf462b0535a72d255acd2bf2681649c797ad18b + last_write_checksum: sha1:88de329b5cc0446b51b7339b49444c129184b63b lib/moderation_api/sdk_hooks/hooks.rb: last_write_checksum: sha1:5b983b37647a1a8a2c35dd4cd4bc68bbde83906f lib/moderation_api/sdk_hooks/types.rb: last_write_checksum: sha1:4c965332c50ba795946cf8df50a6202e89db0a45 lib/moderation_api/sdkconfiguration.rb: - last_write_checksum: sha1:f7dfc163b0483e449e76faa2d9c7d2e54322137e + last_write_checksum: sha1:f829e80250eee5e239bf0c6d532e68250d34410a lib/moderation_api/sdkconfiguration.rbi: last_write_checksum: sha1:0ff7c53716ae2b6668c84ad4f83b9a8697482c33 lib/moderation_api/utils/forms.rb: @@ -2168,11 +2522,11 @@ trackedFiles: lib/moderation_api/webhooksecret.rb: last_write_checksum: sha1:233f69692169d89c8b9c7a02f67dfb43437bbd3e lib/moderation_api/wordlist.rb: - last_write_checksum: sha1:ce2f83b2a436579623bd3e83ffc8114eb5c19458 + last_write_checksum: sha1:d37f222f1fcb517a2d99e68a715b16627882272d lib/moderation_api/words.rb: last_write_checksum: sha1:1caff3b1db9983d6cd6d76e0f90d47a39e376842 moderation_api.gemspec: - last_write_checksum: sha1:071948ee566406c7314b8ff48f67d64576c4069c + last_write_checksum: sha1:81aef4cf4776d475b8ceb30d30c84428286a8360 sorbet/config: last_write_checksum: sha1:d02b32628dad70edc5929a9b9801d5e2dca15d40 sorbet/rbi/annotations/.gitattributes: @@ -2292,7 +2646,7 @@ examples: id: "" responses: "200": - application/json: {"queue": {"id": "", "name": "", "description": "furiously certification tighten", "filter": {}, "unresolvedItemsCount": 1559.96, "resolvedItemsCount": 1949.18, "totalItemsCount": 1912.44}} + application/json: {"queue": {"id": "", "name": "", "description": "furiously certification tighten", "isDefault": true, "unresolvedItemsCount": 1559.96, "resolvedItemsCount": 1949.18, "totalItemsCount": 1912.44}} "400": application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://actual-thyme.biz/"} "401": @@ -2314,7 +2668,7 @@ examples: withinDays: 30 responses: "200": - application/json: {"reviewStats": {"averageTimeToReview": 3713.81, "totalReviewed": 9855.4, "totalPending": 2413.77}, "actionStats": [{"actionId": "", "actionName": "", "count": 4507.74, "percentageOfTotal": 3785.01}], "topReviewers": [], "trends": {"dailyReviewCounts": [{"date": "2024-07-26", "count": 794.3}], "flaggedContentTrends": []}} + application/json: {"reviewStats": {"totalReviewed": 9855.4, "totalPending": 2413.77}, "topReviewers": [], "trends": {"dailyReviewCounts": [{"date": "2024-07-26", "count": 794.3}]}} "400": application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://accomplished-councilman.com/"} "401": @@ -2338,7 +2692,7 @@ examples: sortDirection: "desc" responses: "200": - application/json: {"data": [{"id": "", "content": "", "labels": [{"label": "", "score": 3108.5, "flagged": false}], "flagged": false, "status": "resolved", "timestamp": 79.16}], "pagination": {"page": 42752, "pageSize": 933228, "total": 306038, "totalPages": 947297, "hasMore": true}} + application/json: {"data": [{"id": "", "contentId": "", "content": {"type": "object", "data": {"key": {"type": "image"}}}, "labels": [{"label": "", "score": 3108.5, "flagged": false}], "flagged": false, "severity": 6116.19, "status": "resolved", "timestamp": 79.16, "language": "", "conversationId": null, "authorId": null, "contentType": ""}], "pagination": {"page": 42752, "pageSize": 933228, "total": 306038, "totalPages": 947297, "hasMore": true}} "400": application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://back-status.info"} "401": @@ -2382,7 +2736,7 @@ examples: application/json: {} responses: "200": - application/json: {"success": false, "status": "", "unresolvedAt": ""} + application/json: {"success": false, "status": "resolved", "unresolvedAt": ""} "400": application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://passionate-partridge.net"} "401": @@ -2933,4 +3287,213 @@ 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/"} + getAnalyticsSummary: + speakeasy-default-get-analytics-summary: + parameters: + query: + range: "30d" + responses: + "200": + application/json: {"range": "90d", "channelId": "", "totals": {"requests": 433848, "flagged": 598421, "flagRate": 2935.14, "allowed": 77552, "rejected": 763138, "sentToReview": 929850, "handledAutomatically": 506554, "flaggedButAllowed": 534731, "distinctAuthors": 148120}, "previousPeriod": {"requests": 787873, "flagged": 594999, "flagRate": 879.43, "allowed": 931019, "rejected": 234100, "sentToReview": 107365, "handledAutomatically": 837316, "flaggedButAllowed": 749172}, "pendingReview": 702903, "flagRateSpike": {"multiple": 7020.68, "recentFlagRate": 7330.75, "baselineFlagRate": 8573.96, "recentFlagged": 850480, "recentRequests": 17927}} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://far-flung-e-mail.info/"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://dreary-skean.org/"} + "403": + application/json: {"type": "permission_error", "code": "permission_denied", "message": "Insufficient access", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://blond-mechanic.info"} + "404": + application/json: {"type": "not_found_error", "code": "resource_not_found", "message": "Not found", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://impartial-violin.biz/"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://juvenile-label.name/"} + "500": + application/json: {"type": "api_error", "code": "internal_error", "message": "Internal server error", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://evil-puppet.org"} + getAnalyticsPolicies: + speakeasy-default-get-analytics-policies: + parameters: + query: + range: "30d" + limit: 8 + responses: + "200": + application/json: {"range": "7d", "channelId": "", "policies": [{"label": "", "flagged": 753055, "previousFlagged": 438914}]} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://amused-freckle.com"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://tedious-muscat.name/"} + "403": + application/json: {"type": "permission_error", "code": "permission_denied", "message": "Insufficient access", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://faraway-sundae.name"} + "404": + application/json: {"type": "not_found_error", "code": "resource_not_found", "message": "Not found", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://confused-provision.name"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://supportive-restaurant.biz/"} + "500": + application/json: {"type": "api_error", "code": "internal_error", "message": "Internal server error", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://remorseful-reasoning.name"} + getAnalyticsAuthors: + speakeasy-default-get-analytics-authors: + parameters: + query: + range: "30d" + limit: 6 + responses: + "200": + application/json: {"range": "90d", "channelId": "", "authors": [{"authorId": "", "name": "", "flagged": 894899}]} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://helpful-warming.org/"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://good-ceramics.biz/"} + "403": + application/json: {"type": "permission_error", "code": "permission_denied", "message": "Insufficient access", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://bulky-fen.info"} + "404": + application/json: {"type": "not_found_error", "code": "resource_not_found", "message": "Not found", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://glum-cod.com"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://pleasing-plugin.name"} + "500": + application/json: {"type": "api_error", "code": "internal_error", "message": "Internal server error", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://mammoth-quart.org"} + getAnalyticsChannels: + speakeasy-default-get-analytics-channels: + parameters: + query: + range: "30d" + responses: + "200": + application/json: {"range": "90d", "channels": [{"id": "", "name": "", "requests": 532881, "flagged": 590382, "flagRate": 3406.46}]} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://only-hutch.info/"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://voluminous-deck.biz/"} + "403": + application/json: {"type": "permission_error", "code": "permission_denied", "message": "Insufficient access", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://trained-switch.com/"} + "404": + application/json: {"type": "not_found_error", "code": "resource_not_found", "message": "Not found", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://joyous-march.info"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://pertinent-traditionalism.info"} + "500": + application/json: {"type": "api_error", "code": "internal_error", "message": "Internal server error", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://sugary-rationale.net"} + getAnalyticsVolumes: + speakeasy-default-get-analytics-volumes: + parameters: + query: + range: "30d" + responses: + "200": + application/json: {"range": "7d", "channelId": "", "bucket": "day", "volumes": []} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://forceful-swim.org/"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://exalted-season.com"} + "403": + application/json: {"type": "permission_error", "code": "permission_denied", "message": "Insufficient access", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://partial-tomatillo.biz"} + "404": + application/json: {"type": "not_found_error", "code": "resource_not_found", "message": "Not found", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://ripe-humidity.info/"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://outrageous-farm.biz"} + "500": + application/json: {"type": "api_error", "code": "internal_error", "message": "Internal server error", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://kooky-possession.biz"} + getAnalyticsAutomation: + speakeasy-default-get-analytics-automation: + parameters: + query: + range: "30d" + responses: + "200": + application/json: {"range": "90d", "channelId": "", "flagged": 724170, "handledByRules": 973248, "handledByCasebook": 407020, "sentToReview": 546279, "mergedDuplicates": 90369, "automationRate": 5715.74, "reviewsAllowed": 813539, "reviewsRejected": 795140, "reviewsResolvedWithoutDecision": 900070, "reviewsUnresolved": 324651, "casebookOverrulings": 565973, "rules": []} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://sunny-wombat.info/"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://pastel-transom.org/"} + "403": + application/json: {"type": "permission_error", "code": "permission_denied", "message": "Insufficient access", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://first-zebra.net"} + "404": + application/json: {"type": "not_found_error", "code": "resource_not_found", "message": "Not found", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://gummy-skyline.biz/"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://warlike-veto.com"} + "500": + application/json: {"type": "api_error", "code": "internal_error", "message": "Internal server error", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://prime-hyphenation.org/"} + createFeedback: + speakeasy-default-create-feedback: + requestBody: + application/json: {"title": "", "description": "commonly oddly whereas onto cooperative serene oh", "type": "feature_request", "source": "api"} + responses: + "200": + application/json: {"id": "", "status": "received"} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://wry-bakeware.org/"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://powerless-testimonial.org"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://esteemed-language.info"} + listQueues: + speakeasy-default-list-queues: + parameters: + query: + page: 1 + pageSize: 20 + responses: + "200": + application/json: {"data": [], "pagination": {"page": 287357, "pageSize": 75276, "total": 18025, "totalPages": 878443, "hasMore": false}} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://scientific-certification.biz"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://intent-integer.name/"} + "403": + application/json: {"type": "permission_error", "code": "permission_denied", "message": "Insufficient access", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://worldly-fog.net/"} + "404": + application/json: {"type": "not_found_error", "code": "resource_not_found", "message": "Not found", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://immaculate-toothbrush.name/"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://medium-outlaw.com"} + "500": + application/json: {"type": "api_error", "code": "internal_error", "message": "Internal server error", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://which-tapioca.name/"} + resolveQueueItems: + speakeasy-default-resolve-queue-items: + parameters: + path: + id: "" + requestBody: + application/json: {"itemIds": ["", "", ""]} + responses: + "200": + application/json: {"resolved": 415438, "notFoundIds": ["", ""]} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://blushing-pick.name"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://moral-daddy.biz"} + "403": + application/json: {"type": "permission_error", "code": "permission_denied", "message": "Insufficient access", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://unlined-eternity.name/"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://burdensome-festival.net/"} + "500": + application/json: {"type": "api_error", "code": "internal_error", "message": "Internal server error", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://kooky-haversack.com"} + createWordlist: + speakeasy-default-create-wordlist: + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"id": "", "name": "", "words": ["", "", ""], "createdAt": "1721740495881", "organizationId": "", "userId": "", "strict": true} + "400": + application/json: {"type": "invalid_request_error", "code": "invalid_request", "message": "Invalid input data", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://vivid-meander.net"} + "401": + application/json: {"type": "authentication_error", "code": "unauthorized", "message": "Authorization not provided", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://shameless-excess.net"} + "429": + application/json: {"type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "Rate limit exceeded", "request_id": "h8fkz6kkzoa446ffve37atys", "doc_url": "https://breakable-insolence.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 a6580bd9..c78deec4 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false ruby: - version: 3.1.1 + version: 3.2.0 additionalDependencies: development: {} runtime: {} diff --git a/.speakeasy/openapi.json b/.speakeasy/openapi.json index 31ff464a..cabb255c 100644 --- a/.speakeasy/openapi.json +++ b/.speakeasy/openapi.json @@ -35,6 +35,10 @@ "name": "Webhooks", "description": "Endpoints that receive events, and the events they receive." }, + { + "name": "Analytics", + "description": "Moderation numbers for a project, as on the dashboard overview." + }, { "name": "Account", "description": "The account that owns the API key." @@ -50,19 +54,23 @@ { "name": "Voice", "description": "Real-time voice moderation over WebSocket." + }, + { + "name": "Feedback", + "description": "Send feature requests and product feedback to the Moderation API team." } ], "externalDocs": { "url": "https://docs.moderationapi.com" }, "paths": { - "/authors": { + "/analytics/summary": { "get": { - "operationId": "listAuthors", - "summary": "List authors", - "description": "List authors with their activity metrics and reputation. The list is paginated.", + "operationId": "getAnalyticsSummary", + "summary": "Get the analytics summary", + "description": "Get the totals of the project for a time window: requests, flags, flag rate, allowed, rejected and sent to review, with the window before for the trend. Also the review queue backlog and a flag-rate spike, if there is one.", "tags": [ - "Authors" + "Analytics" ], "security": [ { @@ -72,78 +80,25 @@ "parameters": [ { "in": "query", - "name": "page", - "schema": { - "default": 1, - "description": "Page number, starting at 1.", - "type": "integer", - "minimum": 1, - "maximum": 100000 - } - }, - { - "in": "query", - "name": "pageSize", - "schema": { - "default": 20, - "description": "Number of items per page. Maximum 100.", - "type": "integer", - "minimum": 1, - "maximum": 100 - } - }, - { - "in": "query", - "name": "sortBy", + "name": "range", "schema": { + "default": "30d", + "description": "The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets.", "type": "string", "enum": [ - "trustLevel", - "violationCount", - "reportCount", - "memberSince", - "lastActive", - "contentCount", - "flaggedContentRatio", - "averageSentiment" + "24h", + "7d", + "30d", + "90d" ] } }, { "in": "query", - "name": "sortDirection", + "name": "channel", "schema": { - "default": "desc", - "description": "Sort direction", "type": "string", - "enum": [ - "asc", - "desc" - ] - } - }, - { - "in": "query", - "name": "memberSinceDate", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "lastActiveDate", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "contentTypes", - "schema": { - "type": "array", - "items": { - "type": "string" - } + "description": "A channel ID or key. Only count content from this channel. Leave out to count all channels." } }, { @@ -153,7 +108,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" } ], @@ -165,20 +120,205 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PublicAuthor" + "range": { + "type": "string", + "enum": [ + "24h", + "7d", + "30d", + "90d" + ], + "description": "The time window of the numbers." + }, + "channelId": { + "description": "The channel the numbers are for. Null when they are for all channels.", + "type": [ + "string", + "null" + ] + }, + "totals": { + "type": "object", + "properties": { + "requests": { + "type": "integer", + "minimum": 0, + "description": "Requests received. Every request counts, also repeats and edits of the same content." + }, + "flagged": { + "type": "integer", + "minimum": 0, + "description": "Requests that were flagged." + }, + "flagRate": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "The share of requests that were flagged: flagged / requests. 0 when there were no requests." + }, + "allowed": { + "type": "integer", + "minimum": 0, + "description": "Requests with the recommendation \"allow\". Includes content that was not flagged." + }, + "rejected": { + "type": "integer", + "minimum": 0, + "description": "Requests with the recommendation \"reject\". All of them were flagged." + }, + "sentToReview": { + "type": "integer", + "minimum": 0, + "description": "Requests with the recommendation \"review\". This counts requests, not the deduplicated items in the review queue." + }, + "handledAutomatically": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests that were settled without human review: rejected plus flaggedButAllowed." + }, + "flaggedButAllowed": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests that were allowed without human review." + }, + "distinctAuthors": { + "type": "integer", + "minimum": 0, + "description": "Distinct authors that sent content in the window. Approximate." + } }, - "description": "The items on this page." + "required": [ + "requests", + "flagged", + "flagRate", + "allowed", + "rejected", + "sentToReview", + "handledAutomatically", + "flaggedButAllowed", + "distinctAuthors" + ], + "additionalProperties": false, + "description": "Request counts for the window. A flagged request has one recommendation: allow, reject or review." }, - "pagination": { - "$ref": "#/components/schemas/Pagination" + "previousPeriod": { + "type": "object", + "properties": { + "requests": { + "type": "integer", + "minimum": 0, + "description": "Requests received. Every request counts, also repeats and edits of the same content." + }, + "flagged": { + "type": "integer", + "minimum": 0, + "description": "Requests that were flagged." + }, + "flagRate": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "The share of requests that were flagged: flagged / requests. 0 when there were no requests." + }, + "allowed": { + "type": "integer", + "minimum": 0, + "description": "Requests with the recommendation \"allow\". Includes content that was not flagged." + }, + "rejected": { + "type": "integer", + "minimum": 0, + "description": "Requests with the recommendation \"reject\". All of them were flagged." + }, + "sentToReview": { + "type": "integer", + "minimum": 0, + "description": "Requests with the recommendation \"review\". This counts requests, not the deduplicated items in the review queue." + }, + "handledAutomatically": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests that were settled without human review: rejected plus flaggedButAllowed." + }, + "flaggedButAllowed": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests that were allowed without human review." + } + }, + "required": [ + "requests", + "flagged", + "flagRate", + "allowed", + "rejected", + "sentToReview", + "handledAutomatically", + "flaggedButAllowed" + ], + "additionalProperties": false, + "description": "The same counts for the window of equal length just before this one. Compare with `totals` to see the trend." + }, + "pendingReview": { + "type": "integer", + "minimum": 0, + "description": "Items in the default review queue that nobody has reviewed yet, counted as the queue counts them (repeats count once). The queue looks back 30 days, so older items are not included. The range does not change it." + }, + "flagRateSpike": { + "anyOf": [ + { + "type": "object", + "properties": { + "multiple": { + "type": "number", + "description": "How many times higher the recent flag rate is than the baseline, for example 2.4." + }, + "recentFlagRate": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "The flag rate in the last 2 days." + }, + "baselineFlagRate": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "The flag rate in the 30 days before that." + }, + "recentFlagged": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests in the last 2 days." + }, + "recentRequests": { + "type": "integer", + "minimum": 0, + "description": "Requests in the last 2 days." + } + }, + "required": [ + "multiple", + "recentFlagRate", + "baselineFlagRate", + "recentFlagged", + "recentRequests" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "Set when the flag rate of the last 2 days is at least 2 times the rate of the 30 days before, with at least 50 flagged requests. Null when there is no spike. Always for the full project: the range and channel do not change it." } }, "required": [ - "data", - "pagination" + "range", + "channelId", + "totals", + "previousPeriod", + "pendingReview", + "flagRateSpike" ], "additionalProperties": false } @@ -246,42 +386,25 @@ } } }, - "x-speakeasy-group": "authors", - "x-speakeasy-name-override": "list", + "x-speakeasy-group": "analytics", + "x-speakeasy-name-override": "summary", "x-speakeasy-mcp": { - "title": "List authors", + "title": "Get the analytics summary", "scopes": [ "read" ], "readOnlyHint": true, "destructiveHint": false - }, - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "pageSize", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.data", - "numPages": "$.pagination.totalPages" - } } - }, - "post": { - "operationId": "createAuthor", - "summary": "Create a new author", - "description": "Create a new author. Typically not needed as authors are created automatically when content is moderated.", + } + }, + "/analytics/policies": { + "get": { + "operationId": "getAnalyticsPolicies", + "summary": "Get the most flagged policies", + "description": "Get the policy labels that flagged the most content in a time window, largest first, with the count in the window before.", "tags": [ - "Authors" + "Analytics" ], "security": [ { @@ -289,6 +412,40 @@ } ], "parameters": [ + { + "in": "query", + "name": "range", + "schema": { + "default": "30d", + "description": "The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets.", + "type": "string", + "enum": [ + "24h", + "7d", + "30d", + "90d" + ] + } + }, + { + "in": "query", + "name": "channel", + "schema": { + "type": "string", + "description": "A channel ID or key. Only count content from this channel. Leave out to count all channels." + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "default": 8, + "description": "How many entries to return, largest first. 1 to 50.", + "type": "integer", + "minimum": 1, + "maximum": 50 + } + }, { "in": "header", "name": "Project-Id", @@ -296,151 +453,71 @@ "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" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "profile_picture": { - "description": "URL of the author's profile picture", - "anyOf": [ - { - "type": "string", - "format": "uri" + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "range": { + "type": "string", + "enum": [ + "24h", + "7d", + "30d", + "90d" + ], + "description": "The time window of the numbers." + }, + "channelId": { + "description": "The channel the numbers are for. Null when they are for all channels.", + "type": [ + "string", + "null" + ] + }, + "policies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The policy label, for example `toxicity`." + }, + "flagged": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests with this label in the window. Repeats count each time." + }, + "previousFlagged": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests with this label in the window of equal length before." + } + }, + "required": [ + "label", + "flagged", + "previousFlagged" + ], + "additionalProperties": false }, - { - "type": "null" - } - ] + "description": "The policy labels with the most flagged requests, largest first." + } }, - "external_link": { - "description": "URL of the author's external profile", - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "null" - } - ] - }, - "name": { - "description": "Author name or identifier", - "type": [ - "string", - "null" - ] - }, - "email": { - "description": "Author email address", - "anyOf": [ - { - "type": "string", - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, - { - "type": "null" - } - ] - }, - "company": { - "description": "The author's company or organization", - "type": [ - "string", - "null" - ] - }, - "metadata": { - "type": "object", - "properties": { - "email_verified": { - "description": "Whether the author's email is verified", - "type": [ - "boolean", - "null" - ] - }, - "phone_verified": { - "description": "Whether the author's phone number is verified", - "type": [ - "boolean", - "null" - ] - }, - "identity_verified": { - "description": "Whether the author's identity is verified", - "type": [ - "boolean", - "null" - ] - }, - "is_paying_customer": { - "description": "Whether the author is a paying customer", - "type": [ - "boolean", - "null" - ] - } - }, - "additionalProperties": {}, - "description": "Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process." - }, - "first_seen": { - "type": "number", - "description": "Timestamp when author first appeared" - }, - "last_seen": { - "type": "number", - "description": "Timestamp of last activity" - }, - "manual_trust_level": { - "anyOf": [ - { - "type": "number", - "minimum": -1, - "maximum": 4 - }, - { - "type": "null" - } - ] - }, - "external_id": { - "type": "string", - "description": "External ID of the user, typically the ID of the author in your database." - } - }, - "required": [ - "external_id" - ] - }, - "example": { - "external_id": "user-1092", - "name": "Jamie Rivera", - "email": "jamie@example.com", - "metadata": { - "email_verified": true, - "is_paying_customer": false - } - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PublicAuthor" + "required": [ + "range", + "channelId", + "policies" + ], + "additionalProperties": false } } } @@ -475,6 +552,16 @@ } } }, + "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": { @@ -496,25 +583,25 @@ } } }, - "x-speakeasy-group": "authors", - "x-speakeasy-name-override": "create", + "x-speakeasy-group": "analytics", + "x-speakeasy-name-override": "policies", "x-speakeasy-mcp": { - "title": "Create a new author", + "title": "Get the most flagged policies", "scopes": [ - "write" + "read" ], - "readOnlyHint": false, + "readOnlyHint": true, "destructiveHint": false } } }, - "/authors/{id}": { + "/analytics/authors": { "get": { - "operationId": "getAuthor", - "summary": "Get author details", - "description": "Get detailed information about a specific author including historical data and analysis", + "operationId": "getAnalyticsAuthors", + "summary": "Get the most flagged authors", + "description": "Get the authors with the most flagged content in a time window, largest first.", "tags": [ - "Authors" + "Analytics" ], "security": [ { @@ -523,14 +610,38 @@ ], "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "range", "schema": { + "default": "30d", + "description": "The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets.", "type": "string", - "description": "Either external ID or the ID assigned by moderation API." - }, - "required": true, - "description": "Either external ID or the ID assigned by moderation API." + "enum": [ + "24h", + "7d", + "30d", + "90d" + ] + } + }, + { + "in": "query", + "name": "channel", + "schema": { + "type": "string", + "description": "A channel ID or key. Only count content from this channel. Leave out to count all channels." + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "default": 6, + "description": "How many entries to return, largest first. 1 to 50.", + "type": "integer", + "minimum": 1, + "maximum": 50 + } }, { "in": "header", @@ -539,7 +650,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" } ], @@ -549,7 +660,63 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicAuthor" + "type": "object", + "properties": { + "range": { + "type": "string", + "enum": [ + "24h", + "7d", + "30d", + "90d" + ], + "description": "The time window of the numbers." + }, + "channelId": { + "description": "The channel the numbers are for. Null when they are for all channels.", + "type": [ + "string", + "null" + ] + }, + "authors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "description": "The author ID from your system. Use it with the authors endpoints." + }, + "name": { + "description": "The author name, if known.", + "type": [ + "string", + "null" + ] + }, + "flagged": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests from this author in the window." + } + }, + "required": [ + "authorId", + "name", + "flagged" + ], + "additionalProperties": false + }, + "description": "The authors with the most flagged requests, largest first. Requests without an author are not included." + } + }, + "required": [ + "range", + "channelId", + "authors" + ], + "additionalProperties": false } } } @@ -615,23 +782,25 @@ } } }, - "x-speakeasy-group": "authors", - "x-speakeasy-name-override": "retrieve", + "x-speakeasy-group": "analytics", + "x-speakeasy-name-override": "authors", "x-speakeasy-mcp": { - "title": "Get author details", + "title": "Get the most flagged authors", "scopes": [ "read" ], "readOnlyHint": true, "destructiveHint": false } - }, - "put": { - "operationId": "updateAuthor", - "summary": "Update author details", - "description": "Update the details of a specific author", + } + }, + "/analytics/channels": { + "get": { + "operationId": "getAnalyticsChannels", + "summary": "Get analytics per channel", + "description": "Get requests, flags and flag rate for each channel of the project in a time window.", "tags": [ - "Authors" + "Analytics" ], "security": [ { @@ -640,14 +809,19 @@ ], "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "range", "schema": { + "default": "30d", + "description": "The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets.", "type": "string", - "description": "Either external ID or the ID assigned by moderation API." - }, - "required": true, - "description": "Either external ID or the ID assigned by moderation API." + "enum": [ + "24h", + "7d", + "30d", + "90d" + ] + } }, { "in": "header", @@ -656,141 +830,75 @@ "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" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "profile_picture": { - "description": "URL of the author's profile picture", - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "null" - } - ] - }, - "external_link": { - "description": "URL of the author's external profile", - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "null" - } - ] - }, - "name": { - "description": "Author name or identifier", - "type": [ - "string", - "null" - ] - }, - "email": { - "description": "Author email address", - "anyOf": [ - { - "type": "string", - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, - { - "type": "null" - } - ] - }, - "company": { - "description": "The author's company or organization", - "type": [ - "string", - "null" - ] - }, - "metadata": { - "type": "object", - "properties": { - "email_verified": { - "description": "Whether the author's email is verified", - "type": [ - "boolean", - "null" - ] - }, - "phone_verified": { - "description": "Whether the author's phone number is verified", - "type": [ - "boolean", - "null" - ] - }, - "identity_verified": { - "description": "Whether the author's identity is verified", - "type": [ - "boolean", - "null" - ] - }, - "is_paying_customer": { - "description": "Whether the author is a paying customer", - "type": [ - "boolean", - "null" - ] - } - }, - "additionalProperties": {}, - "description": "Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process." - }, - "first_seen": { - "type": "number", - "description": "Timestamp when author first appeared" - }, - "last_seen": { - "type": "number", - "description": "Timestamp of last activity" - }, - "manual_trust_level": { - "anyOf": [ - { - "type": "number", - "minimum": -1, - "maximum": 4 - }, - { - "type": "null" - } - ] - } - } - }, - "example": { - "manual_trust_level": 2, - "metadata": { - "identity_verified": true - } - } - } - } - }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublicAuthor" + "type": "object", + "properties": { + "range": { + "type": "string", + "enum": [ + "24h", + "7d", + "30d", + "90d" + ], + "description": "The time window of the numbers." + }, + "channels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The channel ID." + }, + "name": { + "type": "string", + "description": "The channel name." + }, + "requests": { + "type": "integer", + "minimum": 0, + "description": "Requests received in this channel." + }, + "flagged": { + "type": "integer", + "minimum": 0, + "description": "Requests flagged in this channel." + }, + "flagRate": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "The share of requests in this channel that were flagged: flagged / requests." + } + }, + "required": [ + "id", + "name", + "requests", + "flagged", + "flagRate" + ], + "additionalProperties": false + }, + "description": "Requests and flags per channel. Channels with no requests in the window are not included." + } + }, + "required": [ + "range", + "channels" + ], + "additionalProperties": false } } } @@ -856,23 +964,25 @@ } } }, - "x-speakeasy-group": "authors", - "x-speakeasy-name-override": "update", + "x-speakeasy-group": "analytics", + "x-speakeasy-name-override": "channels", "x-speakeasy-mcp": { - "title": "Update author details", + "title": "Get analytics per channel", "scopes": [ - "write" + "read" ], - "readOnlyHint": false, + "readOnlyHint": true, "destructiveHint": false } - }, - "delete": { - "operationId": "deleteAuthor", - "summary": "Delete an author", - "description": "Delete a specific author. This resets the author: status, blocks, trust level, metrics and action history are removed. The author is created again with a clean record the next time content is moderated for the same ID.", + } + }, + "/analytics/volumes": { + "get": { + "operationId": "getAnalyticsVolumes", + "summary": "Get volumes over time", + "description": "Get requests, flags, rejections and reviews per hour (24h) or per day (7d, 30d, 90d), oldest first.", "tags": [ - "Authors" + "Analytics" ], "security": [ { @@ -881,14 +991,27 @@ ], "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "range", "schema": { + "default": "30d", + "description": "The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets.", "type": "string", - "description": "Either external ID or the ID assigned by moderation API." - }, - "required": true, - "description": "Either external ID or the ID assigned by moderation API." + "enum": [ + "24h", + "7d", + "30d", + "90d" + ] + } + }, + { + "in": "query", + "name": "channel", + "schema": { + "type": "string", + "description": "A channel ID or key. Only count content from this channel. Leave out to count all channels." + } }, { "in": "header", @@ -897,7 +1020,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" } ], @@ -909,12 +1032,78 @@ "schema": { "type": "object", "properties": { - "success": { - "type": "boolean" + "range": { + "type": "string", + "enum": [ + "24h", + "7d", + "30d", + "90d" + ], + "description": "The time window of the numbers." + }, + "channelId": { + "description": "The channel the numbers are for. Null when they are for all channels.", + "type": [ + "string", + "null" + ] + }, + "bucket": { + "type": "string", + "enum": [ + "hour", + "day" + ], + "description": "The size of each entry in `volumes`." + }, + "volumes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "Start of the bucket, as an ISO 8601 timestamp in UTC." + }, + "requests": { + "type": "integer", + "minimum": 0, + "description": "Requests received in the bucket." + }, + "flagged": { + "type": "integer", + "minimum": 0, + "description": "Requests flagged in the bucket." + }, + "rejected": { + "type": "integer", + "minimum": 0, + "description": "Requests with the recommendation \"reject\" in the bucket." + }, + "sentToReview": { + "type": "integer", + "minimum": 0, + "description": "Requests with the recommendation \"review\" in the bucket." + } + }, + "required": [ + "start", + "requests", + "flagged", + "rejected", + "sentToReview" + ], + "additionalProperties": false + }, + "description": "Counts over time, oldest first. Buckets with no requests are included with zeros." } }, "required": [ - "success" + "range", + "channelId", + "bucket", + "volumes" ], "additionalProperties": false } @@ -982,25 +1171,25 @@ } } }, - "x-speakeasy-group": "authors", - "x-speakeasy-name-override": "delete", + "x-speakeasy-group": "analytics", + "x-speakeasy-name-override": "volumes", "x-speakeasy-mcp": { - "title": "Delete an author", + "title": "Get volumes over time", "scopes": [ - "destructive" + "read" ], - "readOnlyHint": false, - "destructiveHint": true + "readOnlyHint": true, + "destructiveHint": false } } }, - "/queue/{id}": { + "/analytics/automation": { "get": { - "operationId": "getQueue", - "summary": "Get a queue", - "description": "Get a queue", + "operationId": "getAnalyticsAutomation", + "summary": "Get the automation breakdown", + "description": "Get how flagged content was handled in a time window: settled by rules or the casebook, or sent to human review, and what the reviewers decided.", "tags": [ - "Review queues" + "Analytics" ], "security": [ { @@ -1009,14 +1198,27 @@ ], "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "range", "schema": { + "default": "30d", + "description": "The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets.", "type": "string", - "description": "The queue ID" - }, - "required": true, - "description": "The queue ID" + "enum": [ + "24h", + "7d", + "30d", + "90d" + ] + } + }, + { + "in": "query", + "name": "channel", + "schema": { + "type": "string", + "description": "A channel ID or key. Only count content from this channel. Leave out to count all channels." + } }, { "in": "header", @@ -1025,7 +1227,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" } ], @@ -1037,288 +1239,125 @@ "schema": { "type": "object", "properties": { - "queue": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" + "range": { + "type": "string", + "enum": [ + "24h", + "7d", + "30d", + "90d" + ], + "description": "The time window of the numbers." + }, + "channelId": { + "description": "The channel the numbers are for. Null when they are for all channels.", + "type": [ + "string", + "null" + ] + }, + "flagged": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests in the window. Counted on a rolling window from the raw requests, so it can be a little different from the summary." + }, + "handledByRules": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests that a rule allowed or rejected without human review." + }, + "handledByCasebook": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests that the casebook settled without human review." + }, + "sentToReview": { + "type": "integer", + "minimum": 0, + "description": "Distinct content items sent to the review queue. Repeats of the same content count once, as in the queue." + }, + "mergedDuplicates": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests that the review queue merged into an item it already shows: repeats, edits and content that was settled later." + }, + "automationRate": { + "anyOf": [ + { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "The share of flagged requests that did not need their own human review: (flagged - sentToReview) / flagged." }, - "filter": { - "type": "object", - "properties": { - "isFlagged": { - "type": "string", - "enum": [ - "ALL", - "FLAGGED", - "NOT_FLAGGED", - "SHADOW_FLAGGED" - ] - }, - "casebookAnswer": { - "type": "string", - "enum": [ - "ALL", - "ALLOWED", - "REJECTED", - "NO_ANSWER" - ] - }, - "casebookAgreement": { - "type": "string", - "enum": [ - "ALL", - "OVERRULED", - "AGREED" - ] - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "filterLabels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "FLAGGED", - "NOT_FLAGGED", - "THRESHOLDS", - "MATCHED" - ] - }, - "minThreshold": { - "anyOf": [ - { - "type": "number", - "minimum": 0, - "maximum": 100 - }, - { - "type": "null" - } - ] - }, - "maxThreshold": { - "anyOf": [ - { - "type": "number", - "minimum": 0, - "maximum": 100 - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "label", - "type" - ], - "additionalProperties": false - } - }, - "metadataFilters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string", - "minLength": 1, - "maxLength": 128 - }, - "value": { - "type": "string", - "maxLength": 512 - } - }, - "required": [ - "key", - "value" - ], - "additionalProperties": false - } - }, - "filteredChannelIds": { - "type": "array", - "items": { - "type": "string" - } - }, - "filteredActionIds": { - "type": "array", - "items": { - "type": "string" - } - }, - "languages": { - "type": "array", - "items": { - "type": "string" - } - }, - "contentTypes": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "profile", - "message", - "post", - "comment", - "event", - "product", - "review", - "voice", - "other" - ] - } - }, - "mediaTypes": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "text", - "image", - "video", - "object", - "audio" - ] - } - }, - "authorTrustLevels": { - "type": "array", - "items": { - "type": "integer", - "minimum": -1, - "maximum": 4 - } - }, - "recommendationActions": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "review", - "allow", - "reject" - ] - } - }, - "minSeverity": { - "type": "integer", - "minimum": 0, - "maximum": 100 - }, - "maxSeverity": { - "type": "integer", - "minimum": 0, - "maximum": 100 - }, - "afterDate": { - "type": "string" - }, - "beforeDate": { - "type": "string" - }, - "within": { - "type": "number", - "exclusiveMinimum": 0 - }, - "withinUnit": { - "type": "string", - "enum": [ - "MINUTES", - "HOURS", - "DAYS", - "WEEKS", - "MONTHS", - "YEARS" - ] - }, - "clearDateWindow": { - "type": "boolean" - }, - "checkStatus": { - "anyOf": [ - { - "type": "string", - "enum": [ - "all", - "checked", - "unchecked" - ] - }, - { - "type": "null" - } - ] - }, - "authorID": { - "type": "string" - }, - "contentID": { - "type": "string" - }, - "conversationIds": { - "type": "array", - "items": { - "type": [ - "string", - "null" - ] - } - }, - "search": { - "type": "array", - "items": { - "type": "string" - } - } + { + "type": "null" + } + ] + }, + "reviewsAllowed": { + "type": "integer", + "minimum": 0, + "description": "Review queue items from this window that a moderator allowed." + }, + "reviewsRejected": { + "type": "integer", + "minimum": 0, + "description": "Review queue items from this window that a moderator rejected." + }, + "reviewsResolvedWithoutDecision": { + "type": "integer", + "minimum": 0, + "description": "Review queue items from this window that a moderator marked as done without allow or reject." + }, + "reviewsUnresolved": { + "type": "integer", + "minimum": 0, + "description": "Review queue items from this window that are still open." + }, + "casebookOverrulings": { + "type": "integer", + "minimum": 0, + "description": "Requests where the casebook decision was different from the decision based on severity." + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The rule name. \"Other rules\" holds all rules after the largest ones." }, - "additionalProperties": false - }, - "unresolvedItemsCount": { - "type": "number" - }, - "resolvedItemsCount": { - "type": "number" + "count": { + "type": "integer", + "minimum": 0, + "description": "Flagged requests that this rule settled." + } }, - "totalItemsCount": { - "type": "number" - } + "required": [ + "name", + "count" + ], + "additionalProperties": false }, - "required": [ - "id", - "name", - "description", - "filter", - "unresolvedItemsCount", - "resolvedItemsCount", - "totalItemsCount" - ], - "additionalProperties": false + "description": "The rules that settled flagged requests without review, largest first. The 5 largest have their own entry. The casebook is one of the rules." } }, "required": [ - "queue" + "range", + "channelId", + "flagged", + "handledByRules", + "handledByCasebook", + "sentToReview", + "mergedDuplicates", + "automationRate", + "reviewsAllowed", + "reviewsRejected", + "reviewsResolvedWithoutDecision", + "reviewsUnresolved", + "casebookOverrulings", + "rules" ], "additionalProperties": false } @@ -1386,10 +1425,10 @@ } } }, - "x-speakeasy-group": "queue", - "x-speakeasy-name-override": "retrieve", + "x-speakeasy-group": "analytics", + "x-speakeasy-name-override": "automation", "x-speakeasy-mcp": { - "title": "Get a queue", + "title": "Get the automation breakdown", "scopes": [ "read" ], @@ -1398,13 +1437,13 @@ } } }, - "/queue/{id}/stats": { + "/authors": { "get": { - "operationId": "getQueueStats", - "summary": "Get queue statistics", - "description": "Get detailed statistics about a moderation queue including review times, action counts, and trends", + "operationId": "listAuthors", + "summary": "List authors", + "description": "List the authors of the project, with their status, trust level and content metrics. The list is paginated. By default, the authors that were active most recently come first.", "tags": [ - "Review queues" + "Authors" ], "security": [ { @@ -1413,24 +1452,68 @@ ], "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "page", "schema": { - "type": "string", - "description": "The queue ID" - }, - "required": true, - "description": "The queue ID" + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } }, { "in": "query", - "name": "withinDays", + "name": "pageSize", "schema": { - "default": 30, - "description": "Number of days to analyze statistics for", + "default": 20, + "description": "Number of items per page. Maximum 100.", "type": "integer", "minimum": 1, - "maximum": 365 + "maximum": 100 + } + }, + { + "in": "query", + "name": "sortBy", + "schema": { + "type": "string", + "enum": [ + "trustLevel", + "violationCount", + "memberSince", + "lastActive", + "contentCount", + "flaggedContentRatio", + "averageSentiment" + ] + } + }, + { + "in": "query", + "name": "sortDirection", + "schema": { + "default": "desc", + "description": "Sort direction", + "type": "string", + "enum": [ + "asc", + "desc" + ] + } + }, + { + "in": "query", + "name": "memberSinceDate", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "lastActiveDate", + "schema": { + "type": "string" } }, { @@ -1440,7 +1523,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" } ], @@ -1452,182 +1535,20 @@ "schema": { "type": "object", "properties": { - "reviewStats": { - "type": "object", - "properties": { - "averageTimeToReview": { - "type": "number", - "description": "Average time in milliseconds to review an item" - }, - "totalReviewed": { - "type": "number", - "description": "Total number of items reviewed" - }, - "totalPending": { - "type": "number", - "description": "Total number of items pending review" - } - }, - "required": [ - "averageTimeToReview", - "totalReviewed", - "totalPending" - ], - "additionalProperties": false - }, - "actionStats": { - "type": "array", - "items": { - "type": "object", - "properties": { - "actionId": { - "type": "string", - "description": "ID of the moderation action" - }, - "actionName": { - "type": "string", - "description": "Name of the moderation action" - }, - "count": { - "type": "number", - "description": "Number of times this action was taken" - }, - "percentageOfTotal": { - "type": "number", - "description": "Percentage this action represents of all actions" - } - }, - "required": [ - "actionId", - "actionName", - "count", - "percentageOfTotal" - ], - "additionalProperties": false - } - }, - "topReviewers": { + "data": { "type": "array", "items": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "ID of the reviewer" - }, - "name": { - "type": "string", - "description": "Name of the reviewer" - }, - "reviewCount": { - "type": "number", - "description": "Number of items reviewed" - }, - "averageTimePerReview": { - "type": "number", - "description": "Average review time in milliseconds" - }, - "accuracyScore": { - "description": "Optional accuracy score based on review quality metrics", - "type": "number" - }, - "topActions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "actionId": { - "type": "string", - "description": "Most used action by this reviewer" - }, - "actionName": { - "type": "string", - "description": "Name of the most used action" - }, - "count": { - "type": "number", - "description": "Number of times this action was used" - } - }, - "required": [ - "actionId", - "actionName", - "count" - ], - "additionalProperties": false - }, - "description": "Most common actions taken by this reviewer" - } - }, - "required": [ - "userId", - "name", - "reviewCount", - "averageTimePerReview", - "topActions" - ], - "additionalProperties": false + "$ref": "#/components/schemas/PublicAuthor" }, - "description": "List of top reviewers and their statistics" + "description": "The items on this page." }, - "trends": { - "type": "object", - "properties": { - "dailyReviewCounts": { - "type": "array", - "items": { - "type": "object", - "properties": { - "date": { - "type": "string", - "description": "Date in YYYY-MM-DD format" - }, - "count": { - "type": "number", - "description": "Number of reviews on this date" - } - }, - "required": [ - "date", - "count" - ], - "additionalProperties": false - } - }, - "flaggedContentTrends": { - "type": "array", - "items": { - "type": "object", - "properties": { - "label": { - "type": "string", - "description": "Content flag/label" - }, - "trend": { - "type": "number", - "description": "Trend indicator (-1 to 1) showing if this type of flagged content is increasing or decreasing" - } - }, - "required": [ - "label", - "trend" - ], - "additionalProperties": false - } - } - }, - "required": [ - "dailyReviewCounts", - "flaggedContentTrends" - ], - "additionalProperties": false + "pagination": { + "$ref": "#/components/schemas/Pagination" } }, "required": [ - "reviewStats", - "actionStats", - "topReviewers", - "trends" + "data", + "pagination" ], "additionalProperties": false } @@ -1695,25 +1616,42 @@ } } }, - "x-speakeasy-group": "queue", - "x-speakeasy-name-override": "getStats", + "x-speakeasy-group": "authors", + "x-speakeasy-name-override": "list", "x-speakeasy-mcp": { - "title": "Get queue statistics", + "title": "List authors", "scopes": [ "read" ], "readOnlyHint": true, "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } } - } - }, - "/queue/{id}/items": { - "get": { - "operationId": "listQueueItems", - "summary": "Get queue items", - "description": "Get paginated list of items in a moderation queue with filtering options", + }, + "post": { + "operationId": "createAuthor", + "summary": "Create a new author", + "description": "Create a new author. Typically not needed as authors are created automatically when content is moderated.", "tags": [ - "Review queues" + "Authors" ], "security": [ { @@ -1722,267 +1660,157 @@ ], "parameters": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "description": "The queue ID" - }, - "required": true, - "description": "The queue ID" - }, - { - "in": "query", - "name": "page", - "schema": { - "default": 1, - "description": "Page number, starting at 1.", - "type": "integer", - "minimum": 1, - "maximum": 100000 - } - }, - { - "in": "query", - "name": "pageSize", - "schema": { - "default": 20, - "description": "Number of items per page. Maximum 100.", - "type": "integer", - "minimum": 1, - "maximum": 100 - } - }, - { - "in": "query", - "name": "sortField", - "schema": { - "type": "string", - "enum": [ - "createdAt", - "severity", - "reviewedAt" - ] - } - }, - { - "in": "query", - "name": "sortDirection", - "schema": { - "default": "desc", - "description": "Sort direction", - "type": "string", - "enum": [ - "asc", - "desc" - ] - } - }, - { - "in": "query", - "name": "conversationIds", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "in": "query", - "name": "labels", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "in": "query", - "name": "afterDate", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "beforeDate", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "includeResolved", - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "authorId", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "filteredActionIds", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "in": "header", - "name": "Project-Id", - "required": false, + "in": "header", + "name": "Project-Id", + "required": false, "schema": { "type": "string" }, - "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", + "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" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "profile_picture": { + "description": "URL of the author's profile picture", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "external_link": { + "description": "URL of the author's external profile", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "name": { + "description": "Author name or identifier", + "type": [ + "string", + "null" + ] + }, + "email": { + "description": "Author email address", + "anyOf": [ + { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + { + "type": "null" + } + ] + }, + "company": { + "description": "The author's company or organization", + "type": [ + "string", + "null" + ] + }, + "metadata": { + "type": "object", + "properties": { + "email_verified": { + "description": "Whether the author's email is verified", + "type": [ + "boolean", + "null" + ] + }, + "phone_verified": { + "description": "Whether the author's phone number is verified", + "type": [ + "boolean", + "null" + ] + }, + "identity_verified": { + "description": "Whether the author's identity is verified", + "type": [ + "boolean", + "null" + ] + }, + "is_paying_customer": { + "description": "Whether the author is a paying customer", + "type": [ + "boolean", + "null" + ] + } + }, + "additionalProperties": {}, + "description": "Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process." + }, + "first_seen": { + "type": "number", + "description": "Timestamp when author first appeared" + }, + "last_seen": { + "type": "number", + "description": "Timestamp of last activity" + }, + "manual_trust_level": { + "anyOf": [ + { + "type": "number", + "minimum": -1, + "maximum": 4 + }, + { + "type": "null" + } + ] + }, + "external_id": { + "type": "string", + "description": "External ID of the user, typically the ID of the author in your database." + } + }, + "required": [ + "external_id" + ] + }, + "example": { + "external_id": "user-1092", + "name": "Jamie Rivera", + "email": "jamie@example.com", + "metadata": { + "email_verified": true, + "is_paying_customer": false + } + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Content ID" - }, - "content": { - "type": "string", - "description": "The content to be moderated" - }, - "language": { - "description": "Content language", - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "label": { - "type": "string", - "description": "Label name" - }, - "score": { - "type": "number", - "description": "Confidence score of the label" - }, - "flagged": { - "type": "boolean", - "description": "Whether this label caused a flag" - } - }, - "required": [ - "label", - "score", - "flagged" - ], - "additionalProperties": false - } - }, - "conversationId": { - "description": "Conversation ID", - "type": "string" - }, - "authorId": { - "description": "Author ID", - "type": "string" - }, - "actions": { - "description": "Action IDs taken on this item", - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Action ID" - }, - "name": { - "type": "string", - "description": "Action name" - }, - "comment": { - "description": "Action comment", - "type": "string" - }, - "timestamp": { - "type": "number", - "description": "Unix timestamp of when the action was taken" - }, - "reviewer": { - "description": "Moderator userID", - "type": "string" - } - }, - "required": [ - "id", - "name", - "timestamp" - ], - "additionalProperties": false - } - }, - "flagged": { - "type": "boolean", - "description": "Whether the item is flagged by any label" - }, - "status": { - "type": "string", - "enum": [ - "pending", - "resolved" - ], - "description": "Status of the item" - }, - "timestamp": { - "type": "number", - "description": "Unix timestamp of when the item was created" - }, - "contentType": { - "description": "Type of the content object", - "type": "string" - } - }, - "required": [ - "id", - "content", - "labels", - "flagged", - "status", - "timestamp" - ], - "additionalProperties": false - }, - "description": "The items on this page." - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" - } - }, - "required": [ - "data", - "pagination" - ], - "additionalProperties": false + "$ref": "#/components/schemas/PublicAuthor" } } } @@ -2017,16 +1845,6 @@ } } }, - "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": { @@ -2048,44 +1866,25 @@ } } }, - "x-speakeasy-group": "queue.items", - "x-speakeasy-name-override": "list", + "x-speakeasy-group": "authors", + "x-speakeasy-name-override": "create", "x-speakeasy-mcp": { - "title": "Get queue items", + "title": "Create a new author", "scopes": [ - "read" + "write" ], - "readOnlyHint": true, + "readOnlyHint": false, "destructiveHint": false - }, - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "pageSize", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.data", - "numPages": "$.pagination.totalPages" - } } } }, - "/queue/{id}/items/{itemId}/resolve": { - "post": { - "operationId": "resolveQueueItem", - "summary": "Resolve a queue item", - "description": "Mark a queue item as resolved with a specific moderation action", + "/authors/{id}": { + "get": { + "operationId": "getAuthor", + "summary": "Get author details", + "description": "Get detailed information about a specific author including historical data and analysis", "tags": [ - "Review queues" + "Authors" ], "security": [ { @@ -2098,20 +1897,10 @@ "name": "id", "schema": { "type": "string", - "description": "The queue ID" - }, - "required": true, - "description": "The queue ID" - }, - { - "in": "path", - "name": "itemId", - "schema": { - "type": "string", - "description": "The item ID to resolve" + "description": "Either external ID or the ID assigned by moderation API." }, "required": true, - "description": "The item ID to resolve" + "description": "Either external ID or the ID assigned by moderation API." }, { "in": "header", @@ -2120,54 +1909,17 @@ "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" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "comment": { - "description": "Optional comment", - "type": "string" - } - } - }, - "example": { - "comment": "Reviewed: no violation." - } - } - } - }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "resolvedAt": { - "type": "string", - "description": "Timestamp when the item was resolved" - }, - "comment": { - "description": "Optional comment", - "type": "string" - } - }, - "required": [ - "success", - "resolvedAt" - ], - "additionalProperties": false + "$ref": "#/components/schemas/PublicAuthor" } } } @@ -2202,6 +1954,16 @@ } } }, + "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": { @@ -2223,25 +1985,23 @@ } } }, - "x-speakeasy-group": "queue.items", - "x-speakeasy-name-override": "resolve", + "x-speakeasy-group": "authors", + "x-speakeasy-name-override": "retrieve", "x-speakeasy-mcp": { - "title": "Resolve a queue item", + "title": "Get author details", "scopes": [ - "write" + "read" ], - "readOnlyHint": false, + "readOnlyHint": true, "destructiveHint": false } - } - }, - "/queue/{id}/items/{itemId}/unresolve": { - "post": { - "operationId": "unresolveQueueItem", - "summary": "Unresolve a queue item", - "description": "Mark a previously resolved queue item as unresolved/pending", + }, + "put": { + "operationId": "updateAuthor", + "summary": "Update author details", + "description": "Update the details of a specific author", "tags": [ - "Review queues" + "Authors" ], "security": [ { @@ -2254,20 +2014,10 @@ "name": "id", "schema": { "type": "string", - "description": "The queue ID" - }, - "required": true, - "description": "The queue ID" - }, - { - "in": "path", - "name": "itemId", - "schema": { - "type": "string", - "description": "The item ID to unresolve" + "description": "Either external ID or the ID assigned by moderation API." }, "required": true, - "description": "The item ID to unresolve" + "description": "Either external ID or the ID assigned by moderation API." }, { "in": "header", @@ -2276,7 +2026,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" } ], @@ -2287,14 +2037,119 @@ "schema": { "type": "object", "properties": { - "comment": { - "description": "Optional reason for unresolving the item", - "type": "string" + "profile_picture": { + "description": "URL of the author's profile picture", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "external_link": { + "description": "URL of the author's external profile", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "name": { + "description": "Author name or identifier", + "type": [ + "string", + "null" + ] + }, + "email": { + "description": "Author email address", + "anyOf": [ + { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + { + "type": "null" + } + ] + }, + "company": { + "description": "The author's company or organization", + "type": [ + "string", + "null" + ] + }, + "metadata": { + "type": "object", + "properties": { + "email_verified": { + "description": "Whether the author's email is verified", + "type": [ + "boolean", + "null" + ] + }, + "phone_verified": { + "description": "Whether the author's phone number is verified", + "type": [ + "boolean", + "null" + ] + }, + "identity_verified": { + "description": "Whether the author's identity is verified", + "type": [ + "boolean", + "null" + ] + }, + "is_paying_customer": { + "description": "Whether the author is a paying customer", + "type": [ + "boolean", + "null" + ] + } + }, + "additionalProperties": {}, + "description": "Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process." + }, + "first_seen": { + "type": "number", + "description": "Timestamp when author first appeared" + }, + "last_seen": { + "type": "number", + "description": "Timestamp of last activity" + }, + "manual_trust_level": { + "anyOf": [ + { + "type": "number", + "minimum": -1, + "maximum": 4 + }, + { + "type": "null" + } + ] } } }, "example": { - "comment": "Reopened after an appeal." + "manual_trust_level": 2, + "metadata": { + "identity_verified": true + } } } } @@ -2305,26 +2160,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "status": { - "type": "string", - "description": "New status of the item" - }, - "unresolvedAt": { - "type": "string", - "description": "Timestamp when the item was unresolved" - } - }, - "required": [ - "success", - "status", - "unresolvedAt" - ], - "additionalProperties": false + "$ref": "#/components/schemas/PublicAuthor" } } } @@ -2359,6 +2195,16 @@ } } }, + "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": { @@ -2380,25 +2226,23 @@ } } }, - "x-speakeasy-group": "queue.items", - "x-speakeasy-name-override": "unresolve", - "x-speakeasy-mcp": { - "title": "Unresolve a queue item", + "x-speakeasy-group": "authors", + "x-speakeasy-name-override": "update", + "x-speakeasy-mcp": { + "title": "Update author details", "scopes": [ - "write" + "destructive" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": true } - } - }, - "/actions": { - "get": { - "operationId": "listActions", - "summary": "List moderation actions", - "description": "List the moderation actions of the project. The list is paginated.", + }, + "delete": { + "operationId": "deleteAuthor", + "summary": "Delete an author", + "description": "Delete a specific author. This resets the author: status, blocks, trust level, metrics and action history are removed. The author is created again with a clean record the next time content is moderated for the same ID.", "tags": [ - "Actions" + "Authors" ], "security": [ { @@ -2407,33 +2251,14 @@ ], "parameters": [ { - "in": "query", - "name": "queueId", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "page", - "schema": { - "default": 1, - "description": "Page number, starting at 1.", - "type": "integer", - "minimum": 1, - "maximum": 100000 - } - }, - { - "in": "query", - "name": "pageSize", + "in": "path", + "name": "id", "schema": { - "default": 20, - "description": "Number of items per page. Maximum 100.", - "type": "integer", - "minimum": 1, - "maximum": 100 - } + "type": "string", + "description": "Either external ID or the ID assigned by moderation API." + }, + "required": true, + "description": "Either external ID or the ID assigned by moderation API." }, { "in": "header", @@ -2442,7 +2267,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" } ], @@ -2454,148 +2279,12 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The ID of the action." - }, - "key": { - "description": "User defined key of the action.", - "type": [ - "string", - "null" - ] - }, - "createdAt": { - "description": "The date the action was created.", - "type": "string" - }, - "name": { - "type": "string", - "description": "The name of the action." - }, - "description": { - "description": "The description of the action.", - "type": [ - "string", - "null" - ] - }, - "type": { - "description": "The type of the action.", - "anyOf": [ - { - "type": "string", - "enum": [ - "AUTHOR_BLOCK", - "AUTHOR_BLOCK_TEMP", - "AUTHOR_UNBLOCK", - "AUTHOR_DELETE", - "AUTHOR_REPORT", - "AUTHOR_WARN", - "AUTHOR_CUSTOM", - "ITEM_REJECT", - "ITEM_ALLOW", - "ITEM_CUSTOM" - ] - }, - { - "type": "null" - } - ] - }, - "builtIn": { - "default": false, - "description": "Whether the action is a built-in action or a custom one.", - "type": [ - "boolean", - "null" - ] - }, - "queueBehaviour": { - "default": "NO_CHANGE", - "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", - "type": "string", - "enum": [ - "REMOVE", - "ADD", - "NO_CHANGE" - ] - }, - "filterInQueueIds": { - "default": [], - "description": "The IDs of the queues the action is available in.", - "type": "array", - "items": { - "type": "string" - } - }, - "position": { - "default": "ALL_QUEUES", - "description": "Show the action in all queues, selected queues or no queues (to use via API only).", - "type": "string", - "enum": [ - "ALL_QUEUES", - "SOME_QUEUES", - "HIDDEN" - ] - }, - "possibleValues": { - "default": [], - "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The value of the action." - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - }, - "valueRequired": { - "default": false, - "description": "Whether the action requires a value to be executed.", - "type": "boolean" - }, - "freeText": { - "default": false, - "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", - "type": "boolean" - } - }, - "required": [ - "id", - "createdAt", - "name", - "builtIn", - "queueBehaviour", - "filterInQueueIds", - "position", - "possibleValues", - "valueRequired", - "freeText" - ], - "additionalProperties": false - }, - "description": "The items on this page." - }, - "pagination": { - "$ref": "#/components/schemas/Pagination" + "success": { + "type": "boolean" } }, "required": [ - "data", - "pagination" + "success" ], "additionalProperties": false } @@ -2663,42 +2352,25 @@ } } }, - "x-speakeasy-group": "actions", - "x-speakeasy-name-override": "list", + "x-speakeasy-group": "authors", + "x-speakeasy-name-override": "delete", "x-speakeasy-mcp": { - "title": "List moderation actions", + "title": "Delete an author", "scopes": [ - "read" - ], - "readOnlyHint": true, - "destructiveHint": false - }, - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "pageSize", - "in": "parameters", - "type": "limit" - } + "destructive" ], - "outputs": { - "results": "$.data", - "numPages": "$.pagination.totalPages" - } + "readOnlyHint": false, + "destructiveHint": true } - }, + } + }, + "/feedback": { "post": { - "operationId": "createAction", - "summary": "Create an action", - "description": "Create an action.", + "operationId": "createFeedback", + "summary": "Send feedback", + "description": "Sends a feature request, bug report or other feedback to the Moderation API team. The team reads every request and can reply by email. Limited to 5 requests per minute per organization.", "tags": [ - "Actions" + "Feedback" ], "security": [ { @@ -2713,7 +2385,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" } ], @@ -2724,127 +2396,57 @@ "schema": { "type": "object", "properties": { - "key": { - "description": "User defined key of the action.", - "type": [ - "string", - "null" - ] - }, - "name": { + "title": { "type": "string", - "description": "The name of the action." + "minLength": 3, + "maxLength": 120, + "description": "A short summary of the request." }, "description": { - "description": "The description of the action.", - "type": [ - "string", - "null" - ] + "type": "string", + "minLength": 10, + "maxLength": 5000, + "description": "What you tried to do, why, and what is missing or does not work. Plain text. Blank lines start new paragraphs." }, "type": { - "description": "The type of the action.", - "anyOf": [ - { - "type": "string", - "enum": [ - "AUTHOR_BLOCK", - "AUTHOR_BLOCK_TEMP", - "AUTHOR_UNBLOCK", - "AUTHOR_DELETE", - "AUTHOR_REPORT", - "AUTHOR_WARN", - "AUTHOR_CUSTOM", - "ITEM_REJECT", - "ITEM_ALLOW", - "ITEM_CUSTOM" - ] - }, - { - "type": "null" - } - ] - }, - "builtIn": { - "default": false, - "description": "Whether the action is a built-in action or a custom one.", - "type": [ - "boolean", - "null" - ] - }, - "queueBehaviour": { - "default": "NO_CHANGE", - "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "default": "feature_request", + "description": "The kind of feedback.", "type": "string", "enum": [ - "REMOVE", - "ADD", - "NO_CHANGE" + "feature_request", + "bug", + "other" ] }, - "filterInQueueIds": { - "default": [], - "description": "The IDs of the queues the action is available in.", - "type": "array", - "items": { - "type": "string" - } - }, - "position": { - "default": "ALL_QUEUES", - "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "source": { + "default": "api", + "description": "Where the feedback was written: MCP server, agent skill, CLI or API.", "type": "string", "enum": [ - "ALL_QUEUES", - "SOME_QUEUES", - "HIDDEN" + "mcp", + "skill", + "cli", + "api" ] - }, - "possibleValues": { - "default": [], - "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The value of the action." - } - }, - "required": [ - "value" - ] - } - }, - "valueRequired": { - "default": false, - "description": "Whether the action requires a value to be executed.", - "type": "boolean" - }, - "freeText": { - "default": false, - "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", - "type": "boolean" } }, "required": [ - "name" + "title", + "description" ] }, "example": { - "name": "Suspend for 24 hours", - "key": "suspend-24h", - "type": "AUTHOR_BLOCK_TEMP", - "queueBehaviour": "REMOVE" + "title": "Filter queue items by author trust level", + "description": "We review queue items by hand. We want to see items from new authors first, so we need a filter for trust level on the queue items list.", + "type": "feature_request", + "source": "mcp" } } } }, "responses": { "200": { - "description": "Action created successfully", + "description": "Feedback received", "content": { "application/json": { "schema": { @@ -2852,129 +2454,17 @@ "properties": { "id": { "type": "string", - "description": "The ID of the action." - }, - "key": { - "description": "User defined key of the action.", - "type": [ - "string", - "null" - ] - }, - "createdAt": { - "description": "The date the action was created.", - "type": "string" - }, - "name": { - "type": "string", - "description": "The name of the action." - }, - "description": { - "description": "The description of the action.", - "type": [ - "string", - "null" - ] - }, - "type": { - "description": "The type of the action.", - "anyOf": [ - { - "type": "string", - "enum": [ - "AUTHOR_BLOCK", - "AUTHOR_BLOCK_TEMP", - "AUTHOR_UNBLOCK", - "AUTHOR_DELETE", - "AUTHOR_REPORT", - "AUTHOR_WARN", - "AUTHOR_CUSTOM", - "ITEM_REJECT", - "ITEM_ALLOW", - "ITEM_CUSTOM" - ] - }, - { - "type": "null" - } - ] - }, - "builtIn": { - "default": false, - "description": "Whether the action is a built-in action or a custom one.", - "type": [ - "boolean", - "null" - ] - }, - "queueBehaviour": { - "default": "NO_CHANGE", - "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", - "type": "string", - "enum": [ - "REMOVE", - "ADD", - "NO_CHANGE" - ] + "description": "ID of the feedback." }, - "filterInQueueIds": { - "default": [], - "description": "The IDs of the queues the action is available in.", - "type": "array", - "items": { - "type": "string" - } - }, - "position": { - "default": "ALL_QUEUES", - "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "status": { "type": "string", - "enum": [ - "ALL_QUEUES", - "SOME_QUEUES", - "HIDDEN" - ] - }, - "possibleValues": { - "default": [], - "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The value of the action." - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - }, - "valueRequired": { - "default": false, - "description": "Whether the action requires a value to be executed.", - "type": "boolean" - }, - "freeText": { - "default": false, - "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", - "type": "boolean" + "const": "received", + "description": "The team received the feedback." } }, "required": [ "id", - "createdAt", - "name", - "builtIn", - "queueBehaviour", - "filterInQueueIds", - "position", - "possibleValues", - "valueRequired", - "freeText" + "status" ], "additionalProperties": false } @@ -3001,16 +2491,6 @@ } } }, - "409": { - "description": "Action with this key already exists", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConflictError" - } - } - } - }, "429": { "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", "content": { @@ -3022,10 +2502,10 @@ } } }, - "x-speakeasy-group": "actions", + "x-speakeasy-group": "feedback", "x-speakeasy-name-override": "create", "x-speakeasy-mcp": { - "title": "Create an action", + "title": "Send feedback", "scopes": [ "write" ], @@ -3034,13 +2514,13 @@ } } }, - "/actions/{id}": { + "/queue": { "get": { - "operationId": "getAction", - "summary": "Get an action", - "description": "Get an action by ID.", + "operationId": "listQueues", + "summary": "List queues", + "description": "List the review queues of the project. The default queue comes first. The list is paginated. To get the item counts of a queue, use `GET /queue/{id}`.", "tags": [ - "Actions" + "Review queues" ], "security": [ { @@ -3049,14 +2529,26 @@ ], "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "page", "schema": { - "type": "string", - "description": "The ID of the action to get." - }, - "required": true, - "description": "The ID of the action to get." + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } }, { "in": "header", @@ -3065,143 +2557,32 @@ "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" } ], "responses": { "200": { - "description": "Action retrieved successfully", + "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "The ID of the action." + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Queue" + }, + "description": "The items on this page." }, - "key": { - "description": "User defined key of the action.", - "type": [ - "string", - "null" - ] - }, - "createdAt": { - "description": "The date the action was created.", - "type": "string" - }, - "name": { - "type": "string", - "description": "The name of the action." - }, - "description": { - "description": "The description of the action.", - "type": [ - "string", - "null" - ] - }, - "type": { - "description": "The type of the action.", - "anyOf": [ - { - "type": "string", - "enum": [ - "AUTHOR_BLOCK", - "AUTHOR_BLOCK_TEMP", - "AUTHOR_UNBLOCK", - "AUTHOR_DELETE", - "AUTHOR_REPORT", - "AUTHOR_WARN", - "AUTHOR_CUSTOM", - "ITEM_REJECT", - "ITEM_ALLOW", - "ITEM_CUSTOM" - ] - }, - { - "type": "null" - } - ] - }, - "builtIn": { - "default": false, - "description": "Whether the action is a built-in action or a custom one.", - "type": [ - "boolean", - "null" - ] - }, - "queueBehaviour": { - "default": "NO_CHANGE", - "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", - "type": "string", - "enum": [ - "REMOVE", - "ADD", - "NO_CHANGE" - ] - }, - "filterInQueueIds": { - "default": [], - "description": "The IDs of the queues the action is available in.", - "type": "array", - "items": { - "type": "string" - } - }, - "position": { - "default": "ALL_QUEUES", - "description": "Show the action in all queues, selected queues or no queues (to use via API only).", - "type": "string", - "enum": [ - "ALL_QUEUES", - "SOME_QUEUES", - "HIDDEN" - ] - }, - "possibleValues": { - "default": [], - "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The value of the action." - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - }, - "valueRequired": { - "default": false, - "description": "Whether the action requires a value to be executed.", - "type": "boolean" - }, - "freeText": { - "default": false, - "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", - "type": "boolean" + "pagination": { + "$ref": "#/components/schemas/Pagination" } }, "required": [ - "id", - "createdAt", - "name", - "builtIn", - "queueBehaviour", - "filterInQueueIds", - "position", - "possibleValues", - "valueRequired", - "freeText" + "data", + "pagination" ], "additionalProperties": false } @@ -3228,6 +2609,16 @@ } } }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, "404": { "description": "Not found", "content": { @@ -3247,25 +2638,56 @@ } } } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } } }, - "x-speakeasy-group": "actions", - "x-speakeasy-name-override": "retrieve", + "x-speakeasy-group": "queue", + "x-speakeasy-name-override": "list", "x-speakeasy-mcp": { - "title": "Get an action", + "title": "List queues", "scopes": [ "read" ], "readOnlyHint": true, "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } } - }, - "put": { - "operationId": "updateAction", - "summary": "Update an action", - "description": "Update an action.", + } + }, + "/queue/{id}": { + "get": { + "operationId": "getQueue", + "summary": "Get a queue", + "description": "Get a review queue with its item counts. The counts use the filters and the date window of the queue, the same as the dashboard.", "tags": [ - "Actions" + "Review queues" ], "security": [ { @@ -3278,10 +2700,10 @@ "name": "id", "schema": { "type": "string", - "description": "The ID of the action to update." + "description": "The queue ID." }, "required": true, - "description": "The ID of the action to update." + "description": "The queue ID." }, { "in": "header", @@ -3290,259 +2712,24 @@ "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" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "description": "User defined key of the action.", - "type": [ - "string", - "null" - ] - }, - "name": { - "type": "string", - "description": "The name of the action." - }, - "description": { - "description": "The description of the action.", - "type": [ - "string", - "null" - ] - }, - "type": { - "description": "The type of the action.", - "anyOf": [ - { - "type": "string", - "enum": [ - "AUTHOR_BLOCK", - "AUTHOR_BLOCK_TEMP", - "AUTHOR_UNBLOCK", - "AUTHOR_DELETE", - "AUTHOR_REPORT", - "AUTHOR_WARN", - "AUTHOR_CUSTOM", - "ITEM_REJECT", - "ITEM_ALLOW", - "ITEM_CUSTOM" - ] - }, - { - "type": "null" - } - ] - }, - "builtIn": { - "default": false, - "description": "Whether the action is a built-in action or a custom one.", - "type": [ - "boolean", - "null" - ] - }, - "queueBehaviour": { - "default": "NO_CHANGE", - "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", - "type": "string", - "enum": [ - "REMOVE", - "ADD", - "NO_CHANGE" - ] - }, - "filterInQueueIds": { - "default": [], - "description": "The IDs of the queues the action is available in.", - "type": "array", - "items": { - "type": "string" - } - }, - "position": { - "default": "ALL_QUEUES", - "description": "Show the action in all queues, selected queues or no queues (to use via API only).", - "type": "string", - "enum": [ - "ALL_QUEUES", - "SOME_QUEUES", - "HIDDEN" - ] - }, - "possibleValues": { - "default": [], - "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The value of the action." - } - }, - "required": [ - "value" - ] - } - }, - "valueRequired": { - "default": false, - "description": "Whether the action requires a value to be executed.", - "type": "boolean" - }, - "freeText": { - "default": false, - "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", - "type": "boolean" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Action updated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The ID of the action." - }, - "key": { - "description": "User defined key of the action.", - "type": [ - "string", - "null" - ] - }, - "createdAt": { - "description": "The date the action was created.", - "type": "string" - }, - "name": { - "type": "string", - "description": "The name of the action." - }, - "description": { - "description": "The description of the action.", - "type": [ - "string", - "null" - ] - }, - "type": { - "description": "The type of the action.", - "anyOf": [ - { - "type": "string", - "enum": [ - "AUTHOR_BLOCK", - "AUTHOR_BLOCK_TEMP", - "AUTHOR_UNBLOCK", - "AUTHOR_DELETE", - "AUTHOR_REPORT", - "AUTHOR_WARN", - "AUTHOR_CUSTOM", - "ITEM_REJECT", - "ITEM_ALLOW", - "ITEM_CUSTOM" - ] - }, - { - "type": "null" - } - ] - }, - "builtIn": { - "default": false, - "description": "Whether the action is a built-in action or a custom one.", - "type": [ - "boolean", - "null" - ] - }, - "queueBehaviour": { - "default": "NO_CHANGE", - "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", - "type": "string", - "enum": [ - "REMOVE", - "ADD", - "NO_CHANGE" - ] - }, - "filterInQueueIds": { - "default": [], - "description": "The IDs of the queues the action is available in.", - "type": "array", - "items": { - "type": "string" - } - }, - "position": { - "default": "ALL_QUEUES", - "description": "Show the action in all queues, selected queues or no queues (to use via API only).", - "type": "string", - "enum": [ - "ALL_QUEUES", - "SOME_QUEUES", - "HIDDEN" - ] - }, - "possibleValues": { - "default": [], - "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", - "type": "array", - "items": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The value of the action." - } - }, - "required": [ - "value" - ], - "additionalProperties": false - } - }, - "valueRequired": { - "default": false, - "description": "Whether the action requires a value to be executed.", - "type": "boolean" - }, - "freeText": { - "default": false, - "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", - "type": "boolean" - } + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "queue": { + "$ref": "#/components/schemas/QueueWithCounts" + } }, "required": [ - "id", - "createdAt", - "name", - "builtIn", - "queueBehaviour", - "filterInQueueIds", - "position", - "possibleValues", - "valueRequired", - "freeText" + "queue" ], "additionalProperties": false } @@ -3569,22 +2756,22 @@ } } }, - "404": { - "description": "Not found", + "403": { + "description": "Insufficient access", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundError" + "$ref": "#/components/schemas/PermissionDeniedError" } } } }, - "409": { - "description": "Action with this key already exists", + "404": { + "description": "Not found", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConflictError" + "$ref": "#/components/schemas/NotFoundError" } } } @@ -3598,25 +2785,37 @@ } } } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } } }, - "x-speakeasy-group": "actions", - "x-speakeasy-name-override": "update", + "x-speakeasy-group": "queue", + "x-speakeasy-name-override": "retrieve", "x-speakeasy-mcp": { - "title": "Update an action", + "title": "Get a queue", "scopes": [ - "write" + "read" ], - "readOnlyHint": false, + "readOnlyHint": true, "destructiveHint": false } - }, - "delete": { - "operationId": "deleteAction", - "summary": "Delete an action", - "description": "Delete an action and all of its webhooks.", + } + }, + "/queue/{id}/stats": { + "get": { + "operationId": "getQueueStats", + "summary": "Get queue statistics", + "description": "Get review statistics of a queue for a period: resolved and pending items, the top reviewers and the resolved items per day.", "tags": [ - "Actions" + "Review queues" ], "security": [ { @@ -3629,10 +2828,21 @@ "name": "id", "schema": { "type": "string", - "description": "The ID of the action to delete." + "description": "The queue ID." }, "required": true, - "description": "The ID of the action to delete." + "description": "The queue ID." + }, + { + "in": "query", + "name": "withinDays", + "schema": { + "default": 30, + "description": "Length of the period in days, up to now.", + "type": "integer", + "minimum": 1, + "maximum": 365 + } }, { "in": "header", @@ -3641,30 +2851,105 @@ "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" } ], "responses": { "200": { - "description": "Action deleted successfully", + "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { - "deleted": { - "type": "boolean", - "description": "Whether the action was deleted." + "reviewStats": { + "type": "object", + "properties": { + "totalReviewed": { + "type": "integer", + "description": "Number of items resolved in this queue in the period." + }, + "totalPending": { + "type": "integer", + "description": "Number of items submitted in the period that wait for review now." + } + }, + "required": [ + "totalReviewed", + "totalPending" + ], + "additionalProperties": false }, - "id": { - "type": "string", - "description": "The ID of the action." + "topReviewers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userId": { + "description": "The user ID of the reviewer. `null` for items resolved with an API key.", + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "The name of the reviewer.", + "type": [ + "string", + "null" + ] + }, + "reviewCount": { + "type": "integer", + "description": "Number of items the reviewer resolved in the period." + } + }, + "required": [ + "userId", + "name", + "reviewCount" + ], + "additionalProperties": false + }, + "description": "Reviewers with the most resolved items, most first. Up to 10." + }, + "trends": { + "type": "object", + "properties": { + "dailyReviewCounts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "description": "Date in YYYY-MM-DD format (UTC)." + }, + "count": { + "type": "integer", + "description": "Number of items resolved." + } + }, + "required": [ + "date", + "count" + ], + "additionalProperties": false + }, + "description": "Resolved items per day. Days with no reviews are left out." + } + }, + "required": [ + "dailyReviewCounts" + ], + "additionalProperties": false } }, "required": [ - "deleted", - "id" + "reviewStats", + "topReviewers", + "trends" ], "additionalProperties": false } @@ -3691,290 +2976,209 @@ } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundError" - } - } - } - }, - "429": { - "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitError" - } - } - } - } - }, - "x-speakeasy-group": "actions", - "x-speakeasy-name-override": "delete", - "x-speakeasy-mcp": { - "title": "Delete an action", - "scopes": [ - "destructive" - ], - "readOnlyHint": false, - "destructiveHint": true - } - } - }, - "/actions/execute": { - "post": { - "operationId": "executeAction", - "summary": "Execute moderation action", - "description": "Execute a moderation action on one or more content items.", - "tags": [ - "Actions" - ], - "security": [ - { - "Authorization": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "Project-Id", - "required": false, - "schema": { - "type": "string" - }, - "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", - "x-speakeasy-name-override": "projectId" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "actionKey": { - "type": "string", - "description": "ID or key of the action to execute" - }, - "contentIds": { - "description": "IDs of the content items to apply the action to. Provide this or authorIds.", - "type": "array", - "items": { - "type": "string" - } - }, - "authorIds": { - "description": "IDs of the authors to apply the action to. Provide this or contentIds.", - "type": "array", - "items": { - "type": "string" - } - }, - "value": { - "description": "Optional value to provide with the action", - "type": "string" - }, - "queueId": { - "description": "Optional queue ID if the action is queue-specific", - "type": "string" - }, - "duration": { - "description": "Optional duration in milliseconds for actions with timeouts", - "type": "number", - "minimum": 0 - } - }, - "required": [ - "actionKey" - ], - "description": "Input parameters" - }, - "example": { - "actionKey": "suspend-24h", - "authorIds": [ - "user-1092" - ] - } - } - } - }, - "responses": { - "200": { - "description": "Action executed successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "description": "Whether the action was executed successfully" - } - }, - "required": [ - "success" - ], - "additionalProperties": false, - "description": "Execution result" - } - } - } - }, - "400": { - "description": "Invalid input data", + "403": { + "description": "Insufficient access", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BadRequestError" + "$ref": "#/components/schemas/PermissionDeniedError" } } } }, - "401": { - "description": "Authorization not provided", + "404": { + "description": "Not found", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthenticationError" + "$ref": "#/components/schemas/NotFoundError" } } } }, - "404": { - "description": "Not found", + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundError" + "$ref": "#/components/schemas/RateLimitError" } } } }, - "429": { - "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "500": { + "description": "Internal server error", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitError" + "$ref": "#/components/schemas/InternalServerError" } } } } }, - "x-speakeasy-group": "actions", - "x-speakeasy-name-override": "execute", + "x-speakeasy-group": "queue", + "x-speakeasy-name-override": "getStats", "x-speakeasy-mcp": { - "title": "Execute moderation action", + "title": "Get queue statistics", "scopes": [ - "destructive" + "read" ], - "readOnlyHint": false, - "destructiveHint": true + "readOnlyHint": true, + "destructiveHint": false } } }, - "/actions/{actionId}/execute": { - "post": { - "operationId": "executeActionById", - "summary": "Execute an action", - "description": "Execute an action on a set of content items in a queue.", + "/queue/{id}/items": { + "get": { + "operationId": "listQueueItems", + "summary": "List queue items", + "description": "List the items of a review queue, with the filters and the date window of the queue applied. By default only pending items. The list is paginated. Use the item `id` to resolve or unresolve an item.", "tags": [ - "Actions" + "Review queues" ], "security": [ { "Authorization": [] } ], - "deprecated": true, "parameters": [ { "in": "path", - "name": "actionId", + "name": "id", "schema": { "type": "string", - "description": "The ID or key of the action to execute." + "description": "The queue ID." }, "required": true, - "description": "The ID or key of the action to execute." + "description": "The queue ID." }, { - "in": "header", - "name": "Project-Id", - "required": false, + "in": "query", + "name": "page", "schema": { - "type": "string" - }, - "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", - "x-speakeasy-name-override": "projectId" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "contentIds": { - "description": "The IDs of the content items to perform the action on.", - "type": "array", - "items": { - "type": "string" - } - }, - "authorIds": { - "description": "IDs of the authors to apply the action to", - "type": "array", - "items": { - "type": "string" - } - }, - "queueId": { - "description": "The ID of the queue the action was performed from if any.", - "type": "string" - }, - "value": { - "description": "The value of the action. Useful to set a reason for the action etc.", - "type": "string" - } - } + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "in": "query", + "name": "sort", + "schema": { + "type": "string", + "enum": [ + "FIFO", + "LIFO", + "RANDOM", + "SEVERITY_DESC" + ] + } + }, + { + "in": "query", + "name": "includeResolved", + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "conversationIds", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "labels", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "authorId", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "filteredActionIds", + "schema": { + "type": "array", + "items": { + "type": "string" } } + }, + { + "in": "query", + "name": "afterDate", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "beforeDate", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "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" } - }, + ], "responses": { "200": { - "description": "Action executed successfully", + "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { - "success": { - "type": "boolean", - "description": "Action executed successfully." - }, - "actionId": { - "type": "string", - "description": "The ID of the action." - }, - "ids": { + "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/QueueItem" }, - "description": "The IDs of the content items." + "description": "The items on this page." + }, + "pagination": { + "$ref": "#/components/schemas/Pagination" } }, "required": [ - "success", - "actionId", - "ids" + "data", + "pagination" ], "additionalProperties": false } @@ -4001,6 +3205,16 @@ } } }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, "404": { "description": "Not found", "content": { @@ -4020,18 +3234,56 @@ } } } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } } }, - "x-speakeasy-ignore": true + "x-speakeasy-group": "queue.items", + "x-speakeasy-name-override": "list", + "x-speakeasy-mcp": { + "title": "List queue items", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } + } } }, - "/webhooks": { - "get": { - "operationId": "listWebhooks", - "summary": "List webhooks", - "description": "List the webhooks of the project. The list is paginated.", + "/queue/{id}/items/{itemId}/resolve": { + "post": { + "operationId": "resolveQueueItem", + "summary": "Resolve a queue item", + "description": "Mark an item of a queue as resolved. It is the same as a check-off in the dashboard: the item leaves the pending list and a QUEUE_ITEM_COMPLETED webhook is sent. To also take a moderation action, use `POST /actions/execute`.", "tags": [ - "Webhooks" + "Review queues" ], "security": [ { @@ -4040,26 +3292,24 @@ ], "parameters": [ { - "in": "query", - "name": "page", + "in": "path", + "name": "id", "schema": { - "default": 1, - "description": "Page number, starting at 1.", - "type": "integer", - "minimum": 1, - "maximum": 100000 - } + "type": "string", + "description": "The queue ID." + }, + "required": true, + "description": "The queue ID." }, { - "in": "query", - "name": "pageSize", + "in": "path", + "name": "itemId", "schema": { - "default": 20, - "description": "Number of items per page. Maximum 100.", - "type": "integer", - "minimum": 1, - "maximum": 100 - } + "type": "string", + "description": "The item ID to resolve." + }, + "required": true, + "description": "The item ID to resolve." }, { "in": "header", @@ -4068,101 +3318,45 @@ "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" } ], "responses": { "200": { - "description": "Webhooks retrieved successfully", + "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The ID of the webhook." - }, - "name": { - "type": "string", - "description": "The webhook's name." - }, - "description": { - "description": "The webhook's description.", - "type": [ - "string", - "null" - ] - }, - "url": { - "type": "string", - "description": "The URL we call when a subscribed event occurs." - }, - "eventTypes": { - "default": [], - "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "QUEUE_ITEM_NEW", - "QUEUE_ITEM_COMPLETED", - "QUEUE_ITEM_ACTION", - "QUEUE_ITEM_REJECTED", - "QUEUE_ITEM_ALLOWED", - "AUTHOR_BLOCKED", - "AUTHOR_UNBLOCKED", - "AUTHOR_SUSPENDED", - "AUTHOR_UPDATED", - "AUTHOR_TRUST_LEVEL_CHANGED", - "AUTHOR_ACTION" - ] - } - }, - "payloadVersion": { - "type": "string", - "enum": [ - "V1", - "V2" - ], - "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." - }, - "createdAt": { - "description": "The date the webhook was created.", - "type": "string" - } - }, - "required": [ - "id", - "name", - "url", - "eventTypes", - "payloadVersion", - "createdAt" - ], - "additionalProperties": false - }, - "description": "The items on this page." + "success": { + "type": "boolean" }, - "pagination": { - "$ref": "#/components/schemas/Pagination" + "resolvedAt": { + "type": "string", + "description": "When the item was resolved (ISO 8601)." } }, "required": [ - "data", - "pagination" + "success", + "resolvedAt" ], "additionalProperties": false } } } }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, "401": { "description": "Authorization not provided", "content": { @@ -4173,6 +3367,16 @@ } } }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, "429": { "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", "content": { @@ -4182,44 +3386,37 @@ } } } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } } }, - "x-speakeasy-group": "webhooks", - "x-speakeasy-name-override": "list", + "x-speakeasy-group": "queue.items", + "x-speakeasy-name-override": "resolve", "x-speakeasy-mcp": { - "title": "List webhooks", + "title": "Resolve a queue item", "scopes": [ - "read" + "write" ], - "readOnlyHint": true, + "readOnlyHint": false, "destructiveHint": false - }, - "x-speakeasy-pagination": { - "type": "offsetLimit", - "inputs": [ - { - "name": "page", - "in": "parameters", - "type": "page" - }, - { - "name": "pageSize", - "in": "parameters", - "type": "limit" - } - ], - "outputs": { - "results": "$.data", - "numPages": "$.pagination.totalPages" - } } - }, + } + }, + "/queue/{id}/items/resolve": { "post": { - "operationId": "createWebhook", - "summary": "Create a webhook", - "description": "Create a webhook subscribed to one or more event types. Deliveries use the v2 envelope and are signed with the project signing secret (see the signing secret endpoint).", + "operationId": "resolveQueueItems", + "summary": "Resolve queue items", + "description": "Mark up to 100 items of a queue as resolved in one request. Each item is resolved the same as with `POST /queue/{id}/items/{itemId}/resolve`. IDs that do not exist in the project are skipped and returned in `notFoundIds`.", "tags": [ - "Webhooks" + "Review queues" ], "security": [ { @@ -4227,6 +3424,16 @@ } ], "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The queue ID." + }, + "required": true, + "description": "The queue ID." + }, { "in": "header", "name": "Project-Id", @@ -4234,7 +3441,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" } ], @@ -4245,57 +3452,24 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "minLength": 1, - "description": "The webhook's name, used to identify it in the dashboard" - }, - "description": { - "description": "The webhook's description", - "type": [ - "string", - "null" - ] - }, - "url": { - "type": "string", - "format": "uri", - "description": "The webhook's URL. We'll call this URL when an event occurs." - }, - "eventTypes": { + "itemIds": { "minItems": 1, + "maxItems": 100, "type": "array", "items": { - "type": "string", - "enum": [ - "QUEUE_ITEM_NEW", - "QUEUE_ITEM_COMPLETED", - "QUEUE_ITEM_ACTION", - "QUEUE_ITEM_REJECTED", - "QUEUE_ITEM_ALLOWED", - "AUTHOR_BLOCKED", - "AUTHOR_UNBLOCKED", - "AUTHOR_SUSPENDED", - "AUTHOR_UPDATED", - "AUTHOR_TRUST_LEVEL_CHANGED", - "AUTHOR_ACTION" - ] + "type": "string" }, - "description": "Event types this webhook subscribes to. One webhook URL receives all events you list here." + "description": "The item IDs to resolve. Up to 100." } }, "required": [ - "name", - "url", - "eventTypes" + "itemIds" ] }, "example": { - "name": "Moderation events", - "url": "https://example.com/webhooks/moderation", - "eventTypes": [ - "QUEUE_ITEM_REJECTED", - "AUTHOR_BLOCKED" + "itemIds": [ + "clx8k2v0e000108l4a9bz3f7q", + "clx8k2v0e000208l4h2mc6d1r" ] } } @@ -4303,72 +3477,27 @@ }, "responses": { "200": { - "description": "Webhook created successfully", + "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "The ID of the webhook." - }, - "name": { - "type": "string", - "description": "The webhook's name." - }, - "description": { - "description": "The webhook's description.", - "type": [ - "string", - "null" - ] - }, - "url": { - "type": "string", - "description": "The URL we call when a subscribed event occurs." + "resolved": { + "type": "integer", + "description": "Number of items resolved." }, - "eventTypes": { - "default": [], - "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", + "notFoundIds": { "type": "array", "items": { - "type": "string", - "enum": [ - "QUEUE_ITEM_NEW", - "QUEUE_ITEM_COMPLETED", - "QUEUE_ITEM_ACTION", - "QUEUE_ITEM_REJECTED", - "QUEUE_ITEM_ALLOWED", - "AUTHOR_BLOCKED", - "AUTHOR_UNBLOCKED", - "AUTHOR_SUSPENDED", - "AUTHOR_UPDATED", - "AUTHOR_TRUST_LEVEL_CHANGED", - "AUTHOR_ACTION" - ] - } - }, - "payloadVersion": { - "type": "string", - "enum": [ - "V1", - "V2" - ], - "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." - }, - "createdAt": { - "description": "The date the webhook was created.", - "type": "string" + "type": "string" + }, + "description": "Item IDs that do not exist in the project." } }, "required": [ - "id", - "name", - "url", - "eventTypes", - "payloadVersion", - "createdAt" + "resolved", + "notFoundIds" ], "additionalProperties": false } @@ -4395,6 +3524,16 @@ } } }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, "429": { "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", "content": { @@ -4404,12 +3543,22 @@ } } } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } } }, - "x-speakeasy-group": "webhooks", - "x-speakeasy-name-override": "create", + "x-speakeasy-group": "queue.items", + "x-speakeasy-name-override": "resolveMany", "x-speakeasy-mcp": { - "title": "Create a webhook", + "title": "Resolve queue items", "scopes": [ "write" ], @@ -4418,13 +3567,13 @@ } } }, - "/webhooks/{id}": { - "get": { - "operationId": "getWebhook", - "summary": "Get a webhook", - "description": "Get a webhook by ID.", + "/queue/{id}/items/{itemId}/unresolve": { + "post": { + "operationId": "unresolveQueueItem", + "summary": "Unresolve a queue item", + "description": "Mark a resolved item of a queue as pending again. It is the same as removing a check-off in the dashboard: the item comes back in the pending list.", "tags": [ - "Webhooks" + "Review queues" ], "security": [ { @@ -4437,10 +3586,20 @@ "name": "id", "schema": { "type": "string", - "description": "The ID of the webhook to get." + "description": "The queue ID." }, "required": true, - "description": "The ID of the webhook to get." + "description": "The queue ID." + }, + { + "in": "path", + "name": "itemId", + "schema": { + "type": "string", + "description": "The item ID to unresolve." + }, + "required": true, + "description": "The item ID to unresolve." }, { "in": "header", @@ -4449,84 +3608,54 @@ "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" } ], "responses": { "200": { - "description": "Webhook retrieved successfully", + "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "The ID of the webhook." - }, - "name": { - "type": "string", - "description": "The webhook's name." - }, - "description": { - "description": "The webhook's description.", - "type": [ - "string", - "null" - ] - }, - "url": { - "type": "string", - "description": "The URL we call when a subscribed event occurs." - }, - "eventTypes": { - "default": [], - "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "QUEUE_ITEM_NEW", - "QUEUE_ITEM_COMPLETED", - "QUEUE_ITEM_ACTION", - "QUEUE_ITEM_REJECTED", - "QUEUE_ITEM_ALLOWED", - "AUTHOR_BLOCKED", - "AUTHOR_UNBLOCKED", - "AUTHOR_SUSPENDED", - "AUTHOR_UPDATED", - "AUTHOR_TRUST_LEVEL_CHANGED", - "AUTHOR_ACTION" - ] - } + "success": { + "type": "boolean" }, - "payloadVersion": { + "status": { "type": "string", "enum": [ - "V1", - "V2" + "pending", + "resolved" ], - "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." + "description": "`pending` waits for review. `resolved` is reviewed." }, - "createdAt": { - "description": "The date the webhook was created.", - "type": "string" + "unresolvedAt": { + "type": "string", + "description": "When the item was unresolved (ISO 8601)." } }, "required": [ - "id", - "name", - "url", - "eventTypes", - "payloadVersion", - "createdAt" + "success", + "status", + "unresolvedAt" ], "additionalProperties": false } } } }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, "401": { "description": "Authorization not provided", "content": { @@ -4537,12 +3666,12 @@ } } }, - "404": { - "description": "Not found", + "403": { + "description": "Insufficient access", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundError" + "$ref": "#/components/schemas/PermissionDeniedError" } } } @@ -4556,25 +3685,37 @@ } } } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } } }, - "x-speakeasy-group": "webhooks", - "x-speakeasy-name-override": "retrieve", + "x-speakeasy-group": "queue.items", + "x-speakeasy-name-override": "unresolve", "x-speakeasy-mcp": { - "title": "Get a webhook", + "title": "Unresolve a queue item", "scopes": [ - "read" + "write" ], - "readOnlyHint": true, + "readOnlyHint": false, "destructiveHint": false } - }, - "put": { - "operationId": "updateWebhook", - "summary": "Update a webhook", - "description": "Update a webhook. Legacy v1 webhooks are read-only: delete them and create a new webhook instead.", + } + }, + "/actions": { + "get": { + "operationId": "listActions", + "summary": "List moderation actions", + "description": "List the moderation actions of the project. The list is paginated.", "tags": [ - "Webhooks" + "Actions" ], "security": [ { @@ -4583,14 +3724,33 @@ ], "parameters": [ { - "in": "path", - "name": "id", + "in": "query", + "name": "queueId", "schema": { - "type": "string", - "description": "The ID of the webhook to update." - }, - "required": true, - "description": "The ID of the webhook to update." + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "schema": { + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } }, { "in": "header", @@ -4599,128 +3759,160 @@ "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" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "description": "The webhook's name, used to identify it in the dashboard" - }, - "description": { - "description": "The webhook's description", - "type": [ - "string", - "null" - ] - }, - "url": { - "type": "string", - "format": "uri", - "description": "The webhook's URL. We'll call this URL when an event occurs." - }, - "eventTypes": { - "minItems": 1, - "type": "array", - "items": { - "type": "string", - "enum": [ - "QUEUE_ITEM_NEW", - "QUEUE_ITEM_COMPLETED", - "QUEUE_ITEM_ACTION", - "QUEUE_ITEM_REJECTED", - "QUEUE_ITEM_ALLOWED", - "AUTHOR_BLOCKED", - "AUTHOR_UNBLOCKED", - "AUTHOR_SUSPENDED", - "AUTHOR_UPDATED", - "AUTHOR_TRUST_LEVEL_CHANGED", - "AUTHOR_ACTION" - ] - }, - "description": "Event types this webhook subscribes to. One webhook URL receives all events you list here." - } - } - } - } - } - }, "responses": { "200": { - "description": "Webhook updated successfully", + "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "The ID of the webhook." - }, - "name": { - "type": "string", - "description": "The webhook's name." - }, - "description": { - "description": "The webhook's description.", - "type": [ - "string", - "null" - ] - }, - "url": { - "type": "string", - "description": "The URL we call when a subscribed event occurs." - }, - "eventTypes": { - "default": [], - "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", + "data": { "type": "array", "items": { - "type": "string", - "enum": [ - "QUEUE_ITEM_NEW", - "QUEUE_ITEM_COMPLETED", - "QUEUE_ITEM_ACTION", - "QUEUE_ITEM_REJECTED", - "QUEUE_ITEM_ALLOWED", - "AUTHOR_BLOCKED", - "AUTHOR_UNBLOCKED", - "AUTHOR_SUSPENDED", - "AUTHOR_UPDATED", - "AUTHOR_TRUST_LEVEL_CHANGED", - "AUTHOR_ACTION" - ] - } - }, - "payloadVersion": { - "type": "string", - "enum": [ - "V1", - "V2" - ], - "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the action." + }, + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "description": "The date the action was created.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" + } + }, + "required": [ + "id", + "createdAt", + "name", + "builtIn", + "queueBehaviour", + "filterInQueueIds", + "position", + "possibleValues", + "valueRequired", + "freeText" + ], + "additionalProperties": false + }, + "description": "The items on this page." }, - "createdAt": { - "description": "The date the webhook was created.", - "type": "string" + "pagination": { + "$ref": "#/components/schemas/Pagination" } }, "required": [ - "id", - "name", - "url", - "eventTypes", - "payloadVersion", - "createdAt" + "data", + "pagination" ], "additionalProperties": false } @@ -4747,6 +3939,16 @@ } } }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, "404": { "description": "Not found", "content": { @@ -4766,25 +3968,54 @@ } } } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } } }, - "x-speakeasy-group": "webhooks", - "x-speakeasy-name-override": "update", + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "list", "x-speakeasy-mcp": { - "title": "Update a webhook", + "title": "List moderation actions", "scopes": [ - "write" + "read" ], - "readOnlyHint": false, + "readOnlyHint": true, "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } } }, - "delete": { - "operationId": "deleteWebhook", - "summary": "Delete a webhook", - "description": "Delete a webhook.", + "post": { + "operationId": "createAction", + "summary": "Create an action", + "description": "Create an action.", "tags": [ - "Webhooks" + "Actions" ], "security": [ { @@ -4792,16 +4023,6 @@ } ], "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "description": "The ID of the webhook to delete." - }, - "required": true, - "description": "The ID of the webhook to delete." - }, { "in": "header", "name": "Project-Id", @@ -4809,86 +4030,334 @@ "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" } ], - "responses": { - "200": { - "description": "Webhook deleted successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "deleted": { - "type": "boolean", - "description": "Whether the webhook was deleted." - }, - "id": { - "type": "string", - "description": "The ID of the webhook." - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] }, - "required": [ - "deleted", - "id" - ], - "additionalProperties": false - } - } - } - }, - "401": { - "description": "Authorization not provided", + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ] + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Suspend for 24 hours", + "key": "suspend-24h", + "type": "AUTHOR_BLOCK_TEMP", + "queueBehaviour": "REMOVE" + } + } + } + }, + "responses": { + "200": { + "description": "Action created successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthenticationError" + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the action." + }, + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "description": "The date the action was created.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" + } + }, + "required": [ + "id", + "createdAt", + "name", + "builtIn", + "queueBehaviour", + "filterInQueueIds", + "position", + "possibleValues", + "valueRequired", + "freeText" + ], + "additionalProperties": false } } } }, - "404": { - "description": "Not found", + "400": { + "description": "Invalid input data", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NotFoundError" + "$ref": "#/components/schemas/BadRequestError" } } } }, - "429": { - "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "401": { + "description": "Authorization not provided", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitError" + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "409": { + "description": "Action with this key already exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConflictError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" } } } } }, - "x-speakeasy-group": "webhooks", - "x-speakeasy-name-override": "delete", + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "create", "x-speakeasy-mcp": { - "title": "Delete a webhook", + "title": "Create an action", "scopes": [ - "destructive" + "write" ], "readOnlyHint": false, - "destructiveHint": true + "destructiveHint": false } } }, - "/webhook-secret": { + "/actions/{id}": { "get": { - "operationId": "getWebhookSecret", - "summary": "Get the webhook signing secret", - "description": "Get the signing secret used to sign webhook deliveries for this project, creating one if none exists yet. Verify deliveries by comparing the `modapi-signature` header to HMAC-SHA256(raw request body, secret) hex-encoded.", + "operationId": "getAction", + "summary": "Get an action", + "description": "Get an action by ID.", "tags": [ - "Webhooks" + "Actions" ], "security": [ { @@ -4896,6 +4365,16 @@ } ], "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the action to get." + }, + "required": true, + "description": "The ID of the action to get." + }, { "in": "header", "name": "Project-Id", @@ -4903,31 +4382,159 @@ "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" } ], "responses": { "200": { - "description": "Signing secret retrieved successfully", + "description": "Action retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { - "secret": { + "id": { "type": "string", - "description": "The signing secret for this project. Every webhook delivery is signed with HMAC-SHA256 over the raw JSON body, hex-encoded in the `modapi-signature` header." + "description": "The ID of the action." + }, + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "description": "The date the action was created.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ], + "additionalProperties": false + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" } }, "required": [ - "secret" + "id", + "createdAt", + "name", + "builtIn", + "queueBehaviour", + "filterInQueueIds", + "position", + "possibleValues", + "valueRequired", + "freeText" ], "additionalProperties": false } } } }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, "401": { "description": "Authorization not provided", "content": { @@ -4938,6 +4545,16 @@ } } }, + "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": { @@ -4949,28 +4566,40 @@ } } }, - "x-speakeasy-group": "webhookSecret", + "x-speakeasy-group": "actions", "x-speakeasy-name-override": "retrieve", "x-speakeasy-mcp": { - "disabled": true + "title": "Get an action", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false } - } - }, - "/moderate/text": { - "post": { - "operationId": "moderateText", - "summary": "Analyze text", - "description": "(Deprecated \u2014 use https://api.moderationapi.com/v1/moderate) Analyze text content. Runs the same policy engine as POST /moderate; the per-model result blocks are approximated from the policies it ran.", + }, + "put": { + "operationId": "updateAction", + "summary": "Update an action", + "description": "Update an action.", "tags": [ - "Content" + "Actions" ], "security": [ { "Authorization": [] } ], - "deprecated": true, "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the action to update." + }, + "required": true, + "description": "The ID of the action to update." + }, { "in": "header", "name": "Project-Id", @@ -4978,7 +4607,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" } ], @@ -4989,219 +4618,250 @@ "schema": { "type": "object", "properties": { - "contentId": { - "description": "The unique ID of the content in your database.", - "type": "string", - "minLength": 1, - "maxLength": 100 + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] }, - "channelKey": { - "description": "The key of the channel.", - "type": "string" + "name": { + "type": "string", + "description": "The name of the action." }, - "doNotStore": { - "description": "Do not store the content. The content won't enter the review queue", - "type": "boolean" + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] }, - "authorId": { - "description": "The author of the content.", - "type": "string" + "type": { + "description": "The type of the action.", + "anyOf": [ + { + "type": "string", + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] + }, + { + "type": "null" + } + ] }, - "contextId": { - "description": "For example the ID of a chat room or a post", - "type": "string" + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] }, - "metadata": { - "description": "Any metadata you want to store with the content", - "type": "object", - "propertyNames": { + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { "type": "string" - }, - "additionalProperties": {} + } }, - "value": { + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", "type": "string", - "maxLength": 100000, - "description": "The text you'd like to analyze. We recommend to submit plain text or HTML" + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } + }, + "required": [ + "value" + ] + } + }, + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" } - }, - "required": [ - "value" - ], - "description": "Input parameters for text moderation" + } } } } }, "responses": { "200": { - "description": "Successful response", + "description": "Action updated successfully", "content": { "application/json": { "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "status": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the action." + }, + "key": { + "description": "User defined key of the action.", + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "description": "The date the action was created.", + "type": "string" + }, + "name": { + "type": "string", + "description": "The name of the action." + }, + "description": { + "description": "The description of the action.", + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "The type of the action.", + "anyOf": [ + { "type": "string", - "description": "Success if the request was successful" - }, - "contentId": { - "description": "The ID of the content.", - "type": "string" - }, - "request": { - "type": "object", - "properties": { - "timestamp": { - "type": "number", - "description": "The timestamp of the request" - }, - "quota_usage": { - "type": "number", - "description": "The quota usage of the request" - } - }, - "required": [ - "timestamp", - "quota_usage" - ], - "additionalProperties": false, - "description": "Information about the request" + "enum": [ + "AUTHOR_BLOCK", + "AUTHOR_BLOCK_TEMP", + "AUTHOR_UNBLOCK", + "AUTHOR_DELETE", + "AUTHOR_REPORT", + "AUTHOR_WARN", + "AUTHOR_CUSTOM", + "ITEM_REJECT", + "ITEM_ALLOW", + "ITEM_CUSTOM" + ] }, - "flagged": { - "type": "boolean", - "description": "Whether the content was flagged by any models" + { + "type": "null" + } + ] + }, + "builtIn": { + "default": false, + "description": "Whether the action is a built-in action or a custom one.", + "type": [ + "boolean", + "null" + ] + }, + "queueBehaviour": { + "default": "NO_CHANGE", + "description": "Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.", + "type": "string", + "enum": [ + "REMOVE", + "ADD", + "NO_CHANGE" + ] + }, + "filterInQueueIds": { + "default": [], + "description": "The IDs of the queues the action is available in.", + "type": "array", + "items": { + "type": "string" + } + }, + "position": { + "default": "ALL_QUEUES", + "description": "Show the action in all queues, selected queues or no queues (to use via API only).", + "type": "string", + "enum": [ + "ALL_QUEUES", + "SOME_QUEUES", + "HIDDEN" + ] + }, + "possibleValues": { + "default": [], + "description": "The possible values of the action. The user will be prompted to select one of these values when executing the action.", + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the action." + } }, - "author": { - "anyOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Author ID in Moderation API" - }, - "external_id": { - "description": "The author's ID from your system", - "type": [ - "string", - "null" - ] - }, - "block": { - "anyOf": [ - { - "type": "object", - "properties": { - "until": { - "description": "The timestamp until which they are blocked if the author is suspended.", - "type": [ - "number", - "null" - ] - }, - "reason": { - "description": "The moderators reason why the author was blocked or suspended.", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ], - "description": "Block or suspension details, if applicable. Null if the author is enabled." - }, - "status": { - "type": "string", - "enum": [ - "enabled", - "suspended", - "blocked" - ], - "description": "Current author status" - }, - "trust_level": { - "type": "object", - "properties": { - "level": { - "type": "number", - "description": "Author trust level (-1, 0, 1, 2, 3, or 4)" - }, - "manual": { - "type": "boolean", - "description": "True if the trust level was set manually by a moderator" - } - }, - "required": [ - "level", - "manual" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "block", - "status", - "trust_level" - ], - "additionalProperties": false - }, - { - "type": "null" - } - ], - "description": "The author of the content if your account has authors enabled. Requires you to send authorId when submitting content." - }, - "content_moderated": { - "type": "boolean", - "description": "Whether the content was moderated or not. Same as `content` !== `original`" - }, - "unicode_spoofing": { - "type": "boolean", - "description": "Whether the content is using look-alike characters. Often used by spammers." - }, - "data_found": { - "type": "boolean", - "description": "Whether any entity matchers found data for the content" - }, - "original": { - "type": "string", - "description": "The original content" - }, - "content": { - "type": "string", - "description": "The content after moderation. With all mask replacements applied and look-alike characters replaced with the original characters." - } - }, - "required": [ - "status", - "request", - "flagged", - "author", - "content_moderated", - "unicode_spoofing", - "data_found", - "original", - "content" - ], - "additionalProperties": false + "required": [ + "value" + ], + "additionalProperties": false + } }, - { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} + "valueRequired": { + "default": false, + "description": "Whether the action requires a value to be executed.", + "type": "boolean" + }, + "freeText": { + "default": false, + "description": "Whether the action allows any text to be entered as a value or if it must be one of the possible values.", + "type": "boolean" } - ] + }, + "required": [ + "id", + "createdAt", + "name", + "builtIn", + "queueBehaviour", + "filterInQueueIds", + "position", + "possibleValues", + "valueRequired", + "freeText" + ], + "additionalProperties": false } } } @@ -5226,55 +4886,71 @@ } } }, - "403": { - "description": "Insufficient access", + "404": { + "description": "Not found", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionDeniedError" + "$ref": "#/components/schemas/NotFoundError" } } } }, - "429": { - "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "409": { + "description": "Action with this key already exists", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RateLimitError" + "$ref": "#/components/schemas/ConflictError" } } } }, - "500": { - "description": "Internal server error", + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InternalServerError" + "$ref": "#/components/schemas/RateLimitError" } } } } }, - "x-speakeasy-ignore": true - } - }, - "/moderate/image": { - "post": { - "operationId": "moderateImage", - "summary": "Analyze image", - "description": "(Deprecated \u2014 use https://api.moderationapi.com/v1/moderate) Analyze an image. Runs the same policy engine as POST /moderate; `labels` is approximated from the policies it ran and `texts` is no longer populated.", + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "update", + "x-speakeasy-mcp": { + "title": "Update an action", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + }, + "delete": { + "operationId": "deleteAction", + "summary": "Delete an action", + "description": "Delete an action and all of its webhooks.", "tags": [ - "Content" + "Actions" ], "security": [ { "Authorization": [] } ], - "deprecated": true, "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "The ID of the action to delete." + }, + "required": true, + "description": "The ID of the action to delete." + }, { "in": "header", "name": "Project-Id", @@ -5282,237 +4958,38 @@ "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" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "contentId": { - "description": "The unique ID of the content in your database.", - "type": "string", - "minLength": 1, - "maxLength": 100 - }, - "channelKey": { - "description": "The key of the channel.", - "type": "string" - }, - "doNotStore": { - "description": "Do not store the content. The content won't enter the review queue", - "type": "boolean" - }, - "authorId": { - "description": "The author of the content.", - "type": "string" - }, - "contextId": { - "description": "For example the ID of a chat room or a post", - "type": "string" - }, - "metadata": { - "description": "Any metadata you want to store with the content", - "type": "object", - "propertyNames": { - "type": "string" + "responses": { + "200": { + "description": "Action deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean", + "description": "Whether the action was deleted." }, - "additionalProperties": {} + "id": { + "type": "string", + "description": "The ID of the action." + } }, - "url": { - "type": "string", - "format": "uri", - "description": "The URL of the image you want to analyze." - } - }, - "required": [ - "url" - ], - "description": "Input parameters for image moderation" + "required": [ + "deleted", + "id" + ], + "additionalProperties": false + } } } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "Success if the request was successful" - }, - "contentId": { - "description": "The ID of the content.", - "type": "string" - }, - "request": { - "type": "object", - "properties": { - "timestamp": { - "type": "number", - "description": "The timestamp of the request" - }, - "quota_usage": { - "type": "number", - "description": "The quota usage of the request" - } - }, - "required": [ - "timestamp", - "quota_usage" - ], - "additionalProperties": false, - "description": "Information about the request" - }, - "flagged": { - "type": "boolean", - "description": "Whether the content was flagged by any models" - }, - "author": { - "anyOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Author ID in Moderation API" - }, - "external_id": { - "description": "The author's ID from your system", - "type": [ - "string", - "null" - ] - }, - "block": { - "anyOf": [ - { - "type": "object", - "properties": { - "until": { - "description": "The timestamp until which they are blocked if the author is suspended.", - "type": [ - "number", - "null" - ] - }, - "reason": { - "description": "The moderators reason why the author was blocked or suspended.", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ], - "description": "Block or suspension details, if applicable. Null if the author is enabled." - }, - "status": { - "type": "string", - "enum": [ - "enabled", - "suspended", - "blocked" - ], - "description": "Current author status" - }, - "trust_level": { - "type": "object", - "properties": { - "level": { - "type": "number", - "description": "Author trust level (-1, 0, 1, 2, 3, or 4)" - }, - "manual": { - "type": "boolean", - "description": "True if the trust level was set manually by a moderator" - } - }, - "required": [ - "level", - "manual" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "block", - "status", - "trust_level" - ], - "additionalProperties": false - }, - { - "type": "null" - } - ], - "description": "The author of the content if your account has authors enabled. Requires you to send authorId when submitting content." - }, - "data_found": { - "type": "boolean", - "description": "Whether any entity matchers found data for the content" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "score": { - "type": "number" - } - }, - "required": [ - "label", - "score" - ], - "additionalProperties": false - }, - "description": "Legacy image labels, approximated from the equivalent policies. Use POST /moderate for the policy probabilities themselves." - } - }, - "required": [ - "status", - "request", - "flagged", - "author", - "data_found", - "labels" - ], - "additionalProperties": false - }, - { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - ] - } - } - } - }, - "400": { - "description": "Invalid input data", + }, + "400": { + "description": "Invalid input data", "content": { "application/json": { "schema": { @@ -5531,12 +5008,12 @@ } } }, - "403": { - "description": "Insufficient access", + "404": { + "description": "Not found", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionDeniedError" + "$ref": "#/components/schemas/NotFoundError" } } } @@ -5550,28 +5027,27 @@ } } } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalServerError" - } - } - } } }, - "x-speakeasy-ignore": true + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "delete", + "x-speakeasy-mcp": { + "title": "Delete an action", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } } }, - "/account": { - "get": { - "operationId": "getAccount", - "summary": "Get account details", - "description": "Get account details", + "/actions/execute": { + "post": { + "operationId": "executeAction", + "summary": "Execute moderation action", + "description": "Execute a moderation action on one or more content items.", "tags": [ - "Account" + "Actions" ], "security": [ { @@ -5586,143 +5062,81 @@ "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" } ], - "responses": { - "200": { - "description": "Account details retrieved successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "ID of the account" - }, - "paid_plan_name": { - "type": "string", - "description": "Name of the paid plan" - }, - "text_api_quota": { - "type": "number", - "description": "Text API quota" - }, - "remaining_quota": { - "type": "number", - "description": "Remaining quota" - }, - "current_project": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "ID of the current project" - }, - "name": { - "type": "string", - "description": "Name of the current project" - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "paid_plan_name", - "text_api_quota", - "remaining_quota" - ], - "additionalProperties": false - } - } - } - }, - "401": { - "description": "Authorization not provided", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthenticationError" - } - } - } - }, - "429": { - "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitError" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "actionKey": { + "type": "string", + "description": "ID or key of the action to execute" + }, + "contentIds": { + "description": "IDs of the content items to apply the action to. Provide this or authorIds.", + "type": "array", + "items": { + "type": "string" + } + }, + "authorIds": { + "description": "IDs of the authors to apply the action to. Provide this or contentIds.", + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "description": "Optional value to provide with the action", + "type": "string" + }, + "queueId": { + "description": "Optional queue ID if the action is queue-specific", + "type": "string" + }, + "duration": { + "description": "Optional duration in milliseconds for actions with timeouts", + "type": "number", + "minimum": 0 + } + }, + "required": [ + "actionKey" + ], + "description": "Input parameters" + }, + "example": { + "actionKey": "suspend-24h", + "authorIds": [ + "user-1092" + ] } } } }, - "x-speakeasy-group": "account", - "x-speakeasy-name-override": "retrieve", - "x-speakeasy-mcp": { - "title": "Get account details", - "scopes": [ - "read" - ], - "readOnlyHint": true, - "destructiveHint": false - } - } - }, - "/auth": { - "get": { - "operationId": "getAuth", - "tags": [ - "Account" - ], - "security": [ - { - "Authorization": [] - } - ], - "deprecated": true, - "parameters": [ - { - "in": "header", - "name": "Project-Id", - "required": false, - "schema": { - "type": "string" - }, - "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", - "x-speakeasy-name-override": "projectId" - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Action executed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { - "type": "string", - "description": "Status of the authentication" - }, - "message": { - "type": "string", - "description": "Message of the authentication" + "success": { + "type": "boolean", + "description": "Whether the action was executed successfully" } }, "required": [ - "status", - "message" + "success" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Execution result" } } } @@ -5747,16 +5161,6 @@ } } }, - "403": { - "description": "Insufficient access", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionDeniedError" - } - } - } - }, "404": { "description": "Not found", "content": { @@ -5767,23 +5171,36 @@ } } }, - "500": { - "description": "Internal server error", + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InternalServerError" + "$ref": "#/components/schemas/RateLimitError" } } } } }, - "x-speakeasy-ignore": true - }, + "x-speakeasy-group": "actions", + "x-speakeasy-name-override": "execute", + "x-speakeasy-mcp": { + "title": "Execute moderation action", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + } + }, + "/actions/{actionId}/execute": { "post": { - "operationId": "createAuth", + "operationId": "executeActionById", + "summary": "Execute an action", + "description": "Execute an action on a set of content items in a queue.", "tags": [ - "Account" + "Actions" ], "security": [ { @@ -5792,6 +5209,16 @@ ], "deprecated": true, "parameters": [ + { + "in": "path", + "name": "actionId", + "schema": { + "type": "string", + "description": "The ID or key of the action to execute." + }, + "required": true, + "description": "The ID or key of the action to execute." + }, { "in": "header", "name": "Project-Id", @@ -5799,7 +5226,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" } ], @@ -5809,36 +5236,62 @@ "application/json": { "schema": { "type": "object", - "properties": {} + "properties": { + "contentIds": { + "description": "The IDs of the content items to perform the action on.", + "type": "array", + "items": { + "type": "string" + } + }, + "authorIds": { + "description": "IDs of the authors to apply the action to", + "type": "array", + "items": { + "type": "string" + } + }, + "queueId": { + "description": "The ID of the queue the action was performed from if any.", + "type": "string" + }, + "value": { + "description": "The value of the action. Useful to set a reason for the action etc.", + "type": "string" + } + } } } } }, "responses": { "200": { - "description": "Successful response", + "description": "Action executed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { - "status": { - "type": "string", - "description": "Status of the authentication" + "success": { + "type": "boolean", + "description": "Action executed successfully." }, - "message": { + "actionId": { "type": "string", - "description": "Message of the authentication" + "description": "The ID of the action." }, - "project": { - "type": "string", - "description": "Name of the authenticated project" + "ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The IDs of the content items." } }, "required": [ - "status", - "message", - "project" + "success", + "actionId", + "ids" ], "additionalProperties": false } @@ -5865,22 +5318,22 @@ } } }, - "403": { - "description": "Insufficient access", + "404": { + "description": "Not found", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionDeniedError" + "$ref": "#/components/schemas/NotFoundError" } } } }, - "500": { - "description": "Internal server error", + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InternalServerError" + "$ref": "#/components/schemas/RateLimitError" } } } @@ -5889,13 +5342,13 @@ "x-speakeasy-ignore": true } }, - "/wordlist": { + "/webhooks": { "get": { - "operationId": "listWordlists", - "summary": "List wordlists", - "description": "List the wordlists of the organization. The list is paginated.", + "operationId": "listWebhooks", + "summary": "List webhooks", + "description": "List the webhooks of the project. The list is paginated.", "tags": [ - "Wordlists" + "Webhooks" ], "security": [ { @@ -5932,13 +5385,13 @@ "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" } ], "responses": { "200": { - "description": "Successful response", + "description": "Webhooks retrieved successfully", "content": { "application/json": { "schema": { @@ -5951,43 +5404,64 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier of the wordlist" + "description": "The ID of the webhook." }, "name": { - "description": "Name of the wordlist", - "type": [ - "string", - "null" - ] + "type": "string", + "description": "The webhook's name." }, "description": { - "description": "Description of the wordlist", + "description": "The webhook's description.", "type": [ "string", "null" ] }, - "createdAt": { - "description": "When the wordlist was created", - "type": [ - "string", - "null" - ] + "url": { + "type": "string", + "description": "The URL we call when a subscribed event occurs." }, - "userId": { - "description": "User who created the wordlist", - "type": [ - "string", - "null" - ] + "eventTypes": { + "default": [], + "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + } + }, + "payloadVersion": { + "type": "string", + "enum": [ + "V1", + "V2" + ], + "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." + }, + "createdAt": { + "description": "The date the webhook was created.", + "type": "string" } }, "required": [ "id", "name", - "description", - "createdAt", - "userId" + "url", + "eventTypes", + "payloadVersion", + "createdAt" ], "additionalProperties": false }, @@ -6006,16 +5480,6 @@ } } }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BadRequestError" - } - } - } - }, "401": { "description": "Authorization not provided", "content": { @@ -6026,26 +5490,6 @@ } } }, - "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": { @@ -6055,22 +5499,12 @@ } } } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalServerError" - } - } - } } }, - "x-speakeasy-group": "wordlist", + "x-speakeasy-group": "webhooks", "x-speakeasy-name-override": "list", "x-speakeasy-mcp": { - "title": "List wordlists", + "title": "List webhooks", "scopes": [ "read" ], @@ -6096,15 +5530,13 @@ "numPages": "$.pagination.totalPages" } } - } - }, - "/wordlist/{id}": { - "get": { - "operationId": "getWordlist", - "summary": "Get wordlist", - "description": "Get a specific wordlist by ID", + }, + "post": { + "operationId": "createWebhook", + "summary": "Create a webhook", + "description": "Create a webhook subscribed to one or more event types. Deliveries use the v2 envelope and are signed with the project signing secret (see the signing secret endpoint).", "tags": [ - "Wordlists" + "Webhooks" ], "security": [ { @@ -6112,16 +5544,6 @@ } ], "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "description": "ID of the wordlist to get" - }, - "required": true, - "description": "ID of the wordlist to get" - }, { "in": "header", "name": "Project-Id", @@ -6129,13 +5551,76 @@ "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" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "description": "The webhook's name, used to identify it in the dashboard" + }, + "description": { + "description": "The webhook's description", + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The webhook's URL. We'll call this URL when an event occurs." + }, + "eventTypes": { + "minItems": 1, + "type": "array", + "items": { + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + }, + "description": "Event types this webhook subscribes to. One webhook URL receives all events you list here." + } + }, + "required": [ + "name", + "url", + "eventTypes" + ] + }, + "example": { + "name": "Moderation events", + "url": "https://example.com/webhooks/moderation", + "eventTypes": [ + "QUEUE_ITEM_REJECTED", + "AUTHOR_BLOCKED" + ] + } + } + } + }, "responses": { "200": { - "description": "Successful response", + "description": "Webhook created successfully", "content": { "application/json": { "schema": { @@ -6143,58 +5628,64 @@ "properties": { "id": { "type": "string", - "description": "ID of the wordlist" + "description": "The ID of the webhook." }, "name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the wordlist" - }, - { - "type": "null" - } + "type": "string", + "description": "The webhook's name." + }, + "description": { + "description": "The webhook's description.", + "type": [ + "string", + "null" ] }, - "words": { + "url": { + "type": "string", + "description": "The URL we call when a subscribed event occurs." + }, + "eventTypes": { + "default": [], + "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", "type": "array", "items": { - "type": "string" - }, - "description": "Words in the wordlist" - }, - "createdAt": { - "description": "Creation date of the wordlist", - "type": "string" + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + } }, - "organizationId": { + "payloadVersion": { "type": "string", - "description": "ID of the organization" + "enum": [ + "V1", + "V2" + ], + "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." }, - "userId": { - "anyOf": [ - { - "type": "string", - "description": "ID of the user" - }, - { - "type": "null" - } - ] - }, - "strict": { - "type": "boolean", - "description": "Strict mode" + "createdAt": { + "description": "The date the webhook was created.", + "type": "string" } }, "required": [ "id", "name", - "words", - "createdAt", - "organizationId", - "userId", - "strict" + "url", + "eventTypes", + "payloadVersion", + "createdAt" ], "additionalProperties": false } @@ -6221,26 +5712,6 @@ } } }, - "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": { @@ -6250,35 +5721,27 @@ } } } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalServerError" - } - } - } } }, - "x-speakeasy-group": "wordlist", - "x-speakeasy-name-override": "retrieve", + "x-speakeasy-group": "webhooks", + "x-speakeasy-name-override": "create", "x-speakeasy-mcp": { - "title": "Get wordlist", + "title": "Create a webhook", "scopes": [ - "read" + "write" ], - "readOnlyHint": true, + "readOnlyHint": false, "destructiveHint": false } - }, - "put": { - "operationId": "updateWordlist", - "summary": "Update wordlist", - "description": "Update a wordlist", + } + }, + "/webhooks/{id}": { + "get": { + "operationId": "getWebhook", + "summary": "Get a webhook", + "description": "Get a webhook by ID.", "tags": [ - "Wordlists" + "Webhooks" ], "security": [ { @@ -6291,10 +5754,10 @@ "name": "id", "schema": { "type": "string", - "description": "ID of the wordlist to update" + "description": "The ID of the webhook to get." }, "required": true, - "description": "ID of the wordlist to update" + "description": "The ID of the webhook to get." }, { "in": "header", @@ -6303,48 +5766,13 @@ "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" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "description": "New name for the wordlist", - "type": "string" - }, - "key": { - "description": "New key for the wordlist", - "type": "string" - }, - "description": { - "description": "New description for the wordlist", - "type": "string" - }, - "words": { - "description": "New words for the wordlist. Replace the existing words with these new ones. Duplicate words will be ignored.", - "type": "array", - "items": { - "type": "string" - } - }, - "strict": { - "description": "Deprecated. Now using threshold in project settings.", - "type": "boolean" - } - } - } - } - } - }, "responses": { "200": { - "description": "Wordlist updated successfully", + "description": "Webhook retrieved successfully", "content": { "application/json": { "schema": { @@ -6352,74 +5780,70 @@ "properties": { "id": { "type": "string", - "description": "ID of the wordlist" + "description": "The ID of the webhook." }, "name": { - "anyOf": [ - { - "type": "string", - "description": "Name of the wordlist" - }, - { - "type": "null" - } + "type": "string", + "description": "The webhook's name." + }, + "description": { + "description": "The webhook's description.", + "type": [ + "string", + "null" ] }, - "words": { + "url": { + "type": "string", + "description": "The URL we call when a subscribed event occurs." + }, + "eventTypes": { + "default": [], + "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", "type": "array", "items": { - "type": "string" - }, - "description": "Words in the wordlist" - }, - "createdAt": { - "description": "Creation date of the wordlist", - "type": "string" + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + } }, - "organizationId": { + "payloadVersion": { "type": "string", - "description": "ID of the organization" - }, - "userId": { - "anyOf": [ - { - "type": "string", - "description": "ID of the user" - }, - { - "type": "null" - } - ] + "enum": [ + "V1", + "V2" + ], + "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." }, - "strict": { - "type": "boolean", - "description": "Strict mode" + "createdAt": { + "description": "The date the webhook was created.", + "type": "string" } }, "required": [ "id", "name", - "words", - "createdAt", - "organizationId", - "userId", - "strict" + "url", + "eventTypes", + "payloadVersion", + "createdAt" ], "additionalProperties": false } } } }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BadRequestError" - } - } - } - }, "401": { "description": "Authorization not provided", "content": { @@ -6451,25 +5875,23 @@ } } }, - "x-speakeasy-group": "wordlist", - "x-speakeasy-name-override": "update", + "x-speakeasy-group": "webhooks", + "x-speakeasy-name-override": "retrieve", "x-speakeasy-mcp": { - "title": "Update wordlist", + "title": "Get a webhook", "scopes": [ - "write" + "read" ], - "readOnlyHint": false, + "readOnlyHint": true, "destructiveHint": false } - } - }, - "/wordlist/{id}/embedding-status": { - "get": { - "operationId": "getWordlistEmbeddingStatus", - "summary": "Get embedding status", - "description": "Get the current embedding progress status for a wordlist", + }, + "put": { + "operationId": "updateWebhook", + "summary": "Update a webhook", + "description": "Update a webhook. Legacy v1 webhooks are read-only: delete them and create a new webhook instead.", "tags": [ - "Wordlists" + "Webhooks" ], "security": [ { @@ -6482,10 +5904,10 @@ "name": "id", "schema": { "type": "string", - "description": "ID of the wordlist to check embedding status for" + "description": "The ID of the webhook to update." }, "required": true, - "description": "ID of the wordlist to check embedding status for" + "description": "The ID of the webhook to update." }, { "in": "header", @@ -6494,38 +5916,130 @@ "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" } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "progress": { - "type": "number", - "description": "Percentage of words that have been embedded (0-100)" - }, - "totalWords": { - "type": "number", - "description": "Total number of words in the wordlist" - }, - "remainingWords": { - "type": "number", - "description": "Number of words still waiting to be embedded" - } - }, - "required": [ - "progress", - "totalWords", - "remainingWords" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "description": "The webhook's name, used to identify it in the dashboard" + }, + "description": { + "description": "The webhook's description", + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string", + "format": "uri", + "description": "The webhook's URL. We'll call this URL when an event occurs." + }, + "eventTypes": { + "minItems": 1, + "type": "array", + "items": { + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + }, + "description": "Event types this webhook subscribes to. One webhook URL receives all events you list here." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Webhook updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the webhook." + }, + "name": { + "type": "string", + "description": "The webhook's name." + }, + "description": { + "description": "The webhook's description.", + "type": [ + "string", + "null" + ] + }, + "url": { + "type": "string", + "description": "The URL we call when a subscribed event occurs." + }, + "eventTypes": { + "default": [], + "description": "Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "QUEUE_ITEM_NEW", + "QUEUE_ITEM_COMPLETED", + "QUEUE_ITEM_ACTION", + "QUEUE_ITEM_REJECTED", + "QUEUE_ITEM_ALLOWED", + "AUTHOR_BLOCKED", + "AUTHOR_UNBLOCKED", + "AUTHOR_SUSPENDED", + "AUTHOR_UPDATED", + "AUTHOR_TRUST_LEVEL_CHANGED", + "AUTHOR_ACTION" + ] + } + }, + "payloadVersion": { + "type": "string", + "enum": [ + "V1", + "V2" + ], + "description": "Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API." + }, + "createdAt": { + "description": "The date the webhook was created.", + "type": "string" + } + }, + "required": [ + "id", + "name", + "url", + "eventTypes", + "payloadVersion", + "createdAt" ], - "additionalProperties": false, - "description": "Embedding status details" + "additionalProperties": false } } } @@ -6550,16 +6064,6 @@ } } }, - "403": { - "description": "Insufficient access", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionDeniedError" - } - } - } - }, "404": { "description": "Not found", "content": { @@ -6579,37 +6083,25 @@ } } } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InternalServerError" - } - } - } } }, - "x-speakeasy-group": "wordlist", - "x-speakeasy-name-override": "getEmbeddingStatus", + "x-speakeasy-group": "webhooks", + "x-speakeasy-name-override": "update", "x-speakeasy-mcp": { - "title": "Get embedding status", + "title": "Update a webhook", "scopes": [ - "read" + "destructive" ], - "readOnlyHint": true, - "destructiveHint": false + "readOnlyHint": false, + "destructiveHint": true } - } - }, - "/wordlist/{id}/words": { - "post": { - "operationId": "addWordlistWords", - "summary": "Add words to wordlist", - "description": "Add words to an existing wordlist", + }, + "delete": { + "operationId": "deleteWebhook", + "summary": "Delete a webhook", + "description": "Delete a webhook.", "tags": [ - "Wordlists" + "Webhooks" ], "security": [ { @@ -6622,10 +6114,10 @@ "name": "id", "schema": { "type": "string", - "description": "ID of the wordlist to add words to" + "description": "The ID of the webhook to delete." }, "required": true, - "description": "ID of the wordlist to add words to" + "description": "The ID of the webhook to delete." }, { "in": "header", @@ -6634,82 +6126,36 @@ "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" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "words": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Array of words to add to the wordlist. Duplicate words will be ignored." - } - }, - "required": [ - "words" - ] - }, - "example": { - "words": [ - "free money", - "click here" - ] - } - } - } - }, "responses": { "200": { - "description": "Words successfully added to wordlist", + "description": "Webhook deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { - "addedCount": { - "type": "number", - "description": "Number of words added" - }, - "totalCount": { - "type": "number", - "description": "Total number of words in wordlist" + "deleted": { + "type": "boolean", + "description": "Whether the webhook was deleted." }, - "addedWords": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of words that were added" + "id": { + "type": "string", + "description": "The ID of the webhook." } }, "required": [ - "addedCount", - "totalCount", - "addedWords" + "deleted", + "id" ], "additionalProperties": false } } } }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BadRequestError" - } - } - } - }, "401": { "description": "Authorization not provided", "content": { @@ -6741,53 +6187,32 @@ } } }, - "x-speakeasy-group": "wordlist.words", - "x-speakeasy-name-override": "add", + "x-speakeasy-group": "webhooks", + "x-speakeasy-name-override": "delete", "x-speakeasy-mcp": { - "title": "Add words to wordlist", + "title": "Delete a webhook", "scopes": [ - "write" + "destructive" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": true } - }, - "delete": { - "operationId": "removeWordlistWords", - "summary": "Remove words from wordlist", - "description": "Remove words from an existing wordlist", - "tags": [ - "Wordlists" - ], - "security": [ - { + } + }, + "/webhook-secret": { + "get": { + "operationId": "getWebhookSecret", + "summary": "Get the webhook signing secret", + "description": "Get the signing secret used to sign webhook deliveries for this project, creating one if none exists yet. Verify deliveries by comparing the `modapi-signature` header to HMAC-SHA256(raw request body, secret) hex-encoded.", + "tags": [ + "Webhooks" + ], + "security": [ + { "Authorization": [] } ], "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "description": "ID of the wordlist to remove words from" - }, - "required": true, - "description": "ID of the wordlist to remove words from" - }, - { - "in": "query", - "name": "words", - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Array of words to remove from the wordlist" - }, - "required": true, - "description": "Array of words to remove from the wordlist" - }, { "in": "header", "name": "Project-Id", @@ -6795,54 +6220,31 @@ "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" } ], "responses": { "200": { - "description": "Words successfully removed from wordlist", + "description": "Signing secret retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { - "removedCount": { - "type": "number", - "description": "Number of words removed" - }, - "totalCount": { - "type": "number", - "description": "Total number of words in wordlist" - }, - "removedWords": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of words removed" + "secret": { + "type": "string", + "description": "The signing secret for this project. Every webhook delivery is signed with HMAC-SHA256 over the raw JSON body, hex-encoded in the `modapi-signature` header." } }, "required": [ - "removedCount", - "totalCount", - "removedWords" + "secret" ], "additionalProperties": false } } } }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BadRequestError" - } - } - } - }, "401": { "description": "Authorization not provided", "content": { @@ -6853,16 +6255,6 @@ } } }, - "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": { @@ -6874,22 +6266,18 @@ } } }, - "x-speakeasy-group": "wordlist.words", - "x-speakeasy-name-override": "remove", + "x-speakeasy-group": "webhookSecret", + "x-speakeasy-name-override": "retrieve", "x-speakeasy-mcp": { - "title": "Remove words from wordlist", - "scopes": [ - "destructive" - ], - "readOnlyHint": false, - "destructiveHint": true + "disabled": true } } }, - "/moderate": { + "/moderate/text": { "post": { - "operationId": "submitContent", - "summary": "Submit content", + "operationId": "moderateText", + "summary": "Analyze text", + "description": "(Deprecated \u2014 use https://api.moderationapi.com/v1/moderate) Analyze text content. Runs the same policy engine as POST /moderate; the per-model result blocks are approximated from the policies it ran.", "tags": [ "Content" ], @@ -6898,6 +6286,7 @@ "Authorization": [] } ], + "deprecated": true, "parameters": [ { "in": "header", @@ -6906,7 +6295,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" } ], @@ -6917,376 +6306,2474 @@ "schema": { "type": "object", "properties": { - "content": { - "oneOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "text" - }, - "text": { - "type": "string", - "maxLength": 100000, - "description": "The content text" - } + "contentId": { + "description": "The unique ID of the content in your database.", + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "channelKey": { + "description": "The key of the channel.", + "type": "string" + }, + "doNotStore": { + "description": "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": { + "description": "The author of the content.", + "type": "string" + }, + "contextId": { + "description": "For example the ID of a chat room or a post", + "type": "string" + }, + "metadata": { + "description": "Any metadata you want to store with the content", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "value": { + "type": "string", + "maxLength": 100000, + "description": "The text you'd like to analyze. We recommend to submit plain text or HTML" + } + }, + "required": [ + "value" + ], + "description": "Input parameters for text moderation" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Success if the request was successful" }, - "required": [ - "type", - "text" - ], - "description": "Text", - "title": "Text" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "image" - }, - "url": { - "description": "A public URL of the image content. Either url or data must be provided.", - "type": "string", - "format": "uri" - }, - "data": { - "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", - "type": "string", - "maxLength": 5500000 - } + "contentId": { + "description": "The ID of the content.", + "type": "string" }, - "required": [ - "type" - ], - "description": "Image", - "title": "Image" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "video" + "request": { + "type": "object", + "properties": { + "timestamp": { + "type": "number", + "description": "The timestamp of the request" + }, + "quota_usage": { + "type": "number", + "description": "The quota usage of the request" + } }, - "url": { - "type": "string", - "format": "uri", - "description": "A public URL of the video content" - } + "required": [ + "timestamp", + "quota_usage" + ], + "additionalProperties": false, + "description": "Information about the request" }, - "required": [ - "type", - "url" - ], - "description": "Video", - "title": "Video" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "audio" - }, - "url": { - "type": "string", - "format": "uri", - "description": "The URL of the audio content" - } + "flagged": { + "type": "boolean", + "description": "Whether the content was flagged by any models" }, - "required": [ - "type", - "url" - ], - "description": "Audio", - "title": "Audio" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "object" - }, - "data": { - "type": "object", - "propertyNames": { - "type": "string", - "description": "The key of the content node" - }, - "additionalProperties": { - "oneOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "text" - }, - "text": { - "type": "string", - "maxLength": 100000, - "description": "The content text" - } - }, - "required": [ - "type", - "text" - ], - "description": "Text", - "title": "Text" + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Author ID in Moderation API" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "image" - }, - "url": { - "description": "A public URL of the image content. Either url or data must be provided.", - "type": "string", - "format": "uri" + "external_id": { + "description": "The author's ID from your system", + "type": [ + "string", + "null" + ] + }, + "block": { + "anyOf": [ + { + "type": "object", + "properties": { + "until": { + "description": "The timestamp until which they are blocked if the author is suspended.", + "type": [ + "number", + "null" + ] + }, + "reason": { + "description": "The moderators reason why the author was blocked or suspended.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false }, - "data": { - "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", - "type": "string", - "maxLength": 5500000 + { + "type": "null" } - }, - "required": [ - "type" ], - "description": "Image", - "title": "Image" + "description": "Block or suspension details, if applicable. Null if the author is enabled." }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "video" - }, - "url": { - "type": "string", - "format": "uri", - "description": "A public URL of the video content" - } - }, - "required": [ - "type", - "url" + "status": { + "type": "string", + "enum": [ + "enabled", + "suspended", + "blocked" ], - "description": "Video", - "title": "Video" + "description": "Current author status" }, - { + "trust_level": { "type": "object", "properties": { - "type": { - "type": "string", - "const": "audio" + "level": { + "type": "number", + "description": "Author trust level (-1, 0, 1, 2, 3, or 4)" }, - "url": { - "type": "string", - "format": "uri", - "description": "The URL of the audio content" + "manual": { + "type": "boolean", + "description": "True if the trust level was set manually by a moderator" } }, "required": [ - "type", - "url" + "level", + "manual" ], - "description": "Audio", - "title": "Audio" + "additionalProperties": false } + }, + "required": [ + "id", + "block", + "status", + "trust_level" ], - "title": "Content leaf", - "type": "object" + "additionalProperties": false }, - "description": "Values in the object. Can be mixed content types." - } + { + "type": "null" + } + ], + "description": "The author of the content if your account has authors enabled. Requires you to send authorId when submitting content." }, - "required": [ - "type", - "data" - ], - "description": "Object", - "title": "Object" - } - ], - "description": "The content sent for moderation", - "type": "object" - }, - "timestamp": { - "description": "Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time.", - "type": "number" - }, - "channel": { - "description": "Provide a channel ID or key. Will use the project's default channel if not provided.", - "type": "string" - }, - "contentId": { - "description": "The unique ID of the content in your database.", - "type": "string", - "maxLength": 100 - }, - "metaType": { - "description": "The meta type of content being moderated", - "type": "string", - "enum": [ - "profile", - "message", - "post", - "comment", - "event", - "product", - "review", - "voice", - "other" - ] - }, - "authorId": { - "description": "The author of the content.", - "type": "string" - }, - "conversationId": { - "description": "For example the ID of a chat room or a post", - "type": "string" - }, - "metadata": { - "description": "Any metadata you want to store with the content", - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - "clientAction": { - "description": "A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content.", - "type": "object", - "properties": { - "action": { - "type": "string", - "enum": [ - "review", - "allow", - "reject" - ], - "description": "Your recommendation for the content: allow, review, or reject." - }, - "behavior": { - "description": "How your recommendation combines with ours. Defaults to 'escalate', which only applies it when stricter than ours; 'override' replaces ours outright.", - "type": "string", - "enum": [ - "override", - "escalate" - ] + "content_moderated": { + "type": "boolean", + "description": "Whether the content was moderated or not. Same as `content` !== `original`" + }, + "unicode_spoofing": { + "type": "boolean", + "description": "Whether the content is using look-alike characters. Often used by spammers." + }, + "data_found": { + "type": "boolean", + "description": "Whether any entity matchers found data for the content" + }, + "original": { + "type": "string", + "description": "The original content" + }, + "content": { + "type": "string", + "description": "The content after moderation. With all mask replacements applied and look-alike characters replaced with the original characters." + } }, - "source": { - "description": "Where your recommendation came from, e.g. \"banned-ip\".", - "type": "string", - "maxLength": 100 - }, - "reason": { - "description": "A human-readable explanation for your recommendation.", - "type": "string", - "maxLength": 500 - } + "required": [ + "status", + "request", + "flagged", + "author", + "content_moderated", + "unicode_spoofing", + "data_found", + "original", + "content" + ], + "additionalProperties": false }, - "required": [ - "action" - ] + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-ignore": true + } + }, + "/moderate/image": { + "post": { + "operationId": "moderateImage", + "summary": "Analyze image", + "description": "(Deprecated \u2014 use https://api.moderationapi.com/v1/moderate) Analyze an image. Runs the same policy engine as POST /moderate; `labels` is approximated from the policies it ran and `texts` is no longer populated.", + "tags": [ + "Content" + ], + "security": [ + { + "Authorization": [] + } + ], + "deprecated": true, + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "contentId": { + "description": "The unique ID of the content in your database.", + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "channelKey": { + "description": "The key of the channel.", + "type": "string" }, "doNotStore": { - "description": "Do not store the content. The content won't enter the review queue", + "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": { - "description": "(Enterprise) override the channel policies for this moderation request only.", - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "flag": { - "type": "boolean" - }, - "threshold": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "id": { - "type": "string", - "const": "toxicity" - } - }, - "required": [ - "flag", - "id" - ], - "title": "Toxicity" + "authorId": { + "description": "The author of the content.", + "type": "string" + }, + "contextId": { + "description": "For example the ID of a chat room or a post", + "type": "string" + }, + "metadata": { + "description": "Any metadata you want to store with the content", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the image you want to analyze." + } + }, + "required": [ + "url" + ], + "description": "Input parameters for image moderation" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Success if the request was successful" }, - { - "type": "object", - "properties": { - "flag": { - "type": "boolean" - }, - "threshold": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "id": { - "type": "string", - "const": "personal_information" - } - }, - "required": [ - "flag", - "id" - ], - "title": "Personal Information" + "contentId": { + "description": "The ID of the content.", + "type": "string" }, - { + "request": { "type": "object", "properties": { - "flag": { - "type": "boolean" - }, - "threshold": { + "timestamp": { "type": "number", - "minimum": 0, - "maximum": 1 + "description": "The timestamp of the request" }, - "id": { - "type": "string", - "const": "hate" + "quota_usage": { + "type": "number", + "description": "The quota usage of the request" } }, "required": [ - "flag", - "id" + "timestamp", + "quota_usage" ], - "title": "Hate" + "additionalProperties": false, + "description": "Information about the request" }, - { - "type": "object", - "properties": { - "flag": { - "type": "boolean" - }, - "threshold": { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - "id": { + "flagged": { + "type": "boolean", + "description": "Whether the content was flagged by any models" + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Author ID in Moderation API" + }, + "external_id": { + "description": "The author's ID from your system", + "type": [ + "string", + "null" + ] + }, + "block": { + "anyOf": [ + { + "type": "object", + "properties": { + "until": { + "description": "The timestamp until which they are blocked if the author is suspended.", + "type": [ + "number", + "null" + ] + }, + "reason": { + "description": "The moderators reason why the author was blocked or suspended.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "Block or suspension details, if applicable. Null if the author is enabled." + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "suspended", + "blocked" + ], + "description": "Current author status" + }, + "trust_level": { + "type": "object", + "properties": { + "level": { + "type": "number", + "description": "Author trust level (-1, 0, 1, 2, 3, or 4)" + }, + "manual": { + "type": "boolean", + "description": "True if the trust level was set manually by a moderator" + } + }, + "required": [ + "level", + "manual" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "block", + "status", + "trust_level" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "The author of the content if your account has authors enabled. Requires you to send authorId when submitting content." + }, + "data_found": { + "type": "boolean", + "description": "Whether any entity matchers found data for the content" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "score": { + "type": "number" + } + }, + "required": [ + "label", + "score" + ], + "additionalProperties": false + }, + "description": "Legacy image labels, approximated from the equivalent policies. Use POST /moderate for the policy probabilities themselves." + } + }, + "required": [ + "status", + "request", + "flagged", + "author", + "data_found", + "labels" + ], + "additionalProperties": false + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-ignore": true + } + }, + "/account": { + "get": { + "operationId": "getAccount", + "summary": "Get account details", + "description": "Get account details", + "tags": [ + "Account" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "responses": { + "200": { + "description": "Account details retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the account" + }, + "paid_plan_name": { + "type": "string", + "description": "Name of the paid plan" + }, + "text_api_quota": { + "type": "number", + "description": "Text API quota" + }, + "remaining_quota": { + "type": "number", + "description": "Remaining quota" + }, + "current_project": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the current project" + }, + "name": { + "type": "string", + "description": "Name of the current project" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "paid_plan_name", + "text_api_quota", + "remaining_quota" + ], + "additionalProperties": false + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "account", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "title": "Get account details", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + } + }, + "/auth": { + "get": { + "operationId": "getAuth", + "tags": [ + "Account" + ], + "security": [ + { + "Authorization": [] + } + ], + "deprecated": true, + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Status of the authentication" + }, + "message": { + "type": "string", + "description": "Message of the authentication" + } + }, + "required": [ + "status", + "message" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-ignore": true + }, + "post": { + "operationId": "createAuth", + "tags": [ + "Account" + ], + "security": [ + { + "Authorization": [] + } + ], + "deprecated": true, + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Status of the authentication" + }, + "message": { + "type": "string", + "description": "Message of the authentication" + }, + "project": { + "type": "string", + "description": "Name of the authenticated project" + } + }, + "required": [ + "status", + "message", + "project" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-ignore": true + } + }, + "/wordlist": { + "get": { + "operationId": "listWordlists", + "summary": "List wordlists", + "description": "List the wordlists of the organization. The list is paginated.", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "page", + "schema": { + "default": 1, + "description": "Page number, starting at 1.", + "type": "integer", + "minimum": 1, + "maximum": 100000 + } + }, + { + "in": "query", + "name": "pageSize", + "schema": { + "default": 20, + "description": "Number of items per page. Maximum 100.", + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the wordlist" + }, + "name": { + "description": "Name of the wordlist", + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "Description of the wordlist", + "type": [ + "string", + "null" + ] + }, + "createdAt": { + "description": "When the wordlist was created", + "type": [ + "string", + "null" + ] + }, + "userId": { + "description": "User who created the wordlist", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "name", + "description", + "createdAt", + "userId" + ], + "additionalProperties": false + }, + "description": "The items on this page." + }, + "pagination": { + "$ref": "#/components/schemas/Pagination" + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist", + "x-speakeasy-name-override": "list", + "x-speakeasy-mcp": { + "title": "List wordlists", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + }, + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "pageSize", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data", + "numPages": "$.pagination.totalPages" + } + } + }, + "post": { + "operationId": "createWordlist", + "summary": "Create wordlist", + "description": "Create a wordlist in the organization. You can add words now or later. Each word is embedded in the background for similarity matching. Use the embedding status endpoint to follow the progress. To use the wordlist in moderation, add it to a policy.", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100, + "description": "Name of the wordlist" + }, + "key": { + "description": "Key of the wordlist. Default: made from the name. If the key is already in use, a suffix is added.", + "type": "string" + }, + "description": { + "description": "Description of the wordlist", + "type": "string" + }, + "words": { + "description": "Words to add to the wordlist. Words are converted to lowercase. Duplicate and empty words are ignored. Maximum 5000 words.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Wordlist created successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the wordlist" + }, + "name": { + "anyOf": [ + { + "type": "string", + "description": "Name of the wordlist" + }, + { + "type": "null" + } + ] + }, + "words": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Words in the wordlist" + }, + "createdAt": { + "description": "Creation date of the wordlist", + "type": "string" + }, + "organizationId": { + "type": "string", + "description": "ID of the organization" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "description": "ID of the user" + }, + { + "type": "null" + } + ] + }, + "strict": { + "type": "boolean", + "description": "Strict mode" + } + }, + "required": [ + "id", + "name", + "words", + "createdAt", + "organizationId", + "userId", + "strict" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist", + "x-speakeasy-name-override": "create", + "x-speakeasy-mcp": { + "title": "Create wordlist", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/wordlist/{id}": { + "get": { + "operationId": "getWordlist", + "summary": "Get wordlist", + "description": "Get a specific wordlist by ID", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "ID of the wordlist to get" + }, + "required": true, + "description": "ID of the wordlist to get" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the wordlist" + }, + "name": { + "anyOf": [ + { + "type": "string", + "description": "Name of the wordlist" + }, + { + "type": "null" + } + ] + }, + "words": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Words in the wordlist" + }, + "createdAt": { + "description": "Creation date of the wordlist", + "type": "string" + }, + "organizationId": { + "type": "string", + "description": "ID of the organization" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "description": "ID of the user" + }, + { + "type": "null" + } + ] + }, + "strict": { + "type": "boolean", + "description": "Strict mode" + } + }, + "required": [ + "id", + "name", + "words", + "createdAt", + "organizationId", + "userId", + "strict" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist", + "x-speakeasy-name-override": "retrieve", + "x-speakeasy-mcp": { + "title": "Get wordlist", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + }, + "put": { + "operationId": "updateWordlist", + "summary": "Update wordlist", + "description": "Update a wordlist. Fields that you do not send stay the same. If you send words, they replace all existing words, and the embeddings are updated in the background.", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "ID of the wordlist to update" + }, + "required": true, + "description": "ID of the wordlist to update" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "New name for the wordlist", + "type": "string" + }, + "key": { + "description": "New key for the wordlist", + "type": "string" + }, + "description": { + "description": "New description for the wordlist", + "type": "string" + }, + "words": { + "description": "New words for the wordlist. Replace the existing words with these new ones. Words are converted to lowercase. Duplicate and empty words are ignored. Maximum 5000 words.", + "type": "array", + "items": { + "type": "string" + } + }, + "strict": { + "description": "Deprecated. Now using threshold in project settings.", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Wordlist updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of the wordlist" + }, + "name": { + "anyOf": [ + { + "type": "string", + "description": "Name of the wordlist" + }, + { + "type": "null" + } + ] + }, + "words": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Words in the wordlist" + }, + "createdAt": { + "description": "Creation date of the wordlist", + "type": "string" + }, + "organizationId": { + "type": "string", + "description": "ID of the organization" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "description": "ID of the user" + }, + { + "type": "null" + } + ] + }, + "strict": { + "type": "boolean", + "description": "Strict mode" + } + }, + "required": [ + "id", + "name", + "words", + "createdAt", + "organizationId", + "userId", + "strict" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist", + "x-speakeasy-name-override": "update", + "x-speakeasy-mcp": { + "title": "Update wordlist", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + } + }, + "/wordlist/{id}/embedding-status": { + "get": { + "operationId": "getWordlistEmbeddingStatus", + "summary": "Get embedding status", + "description": "Get the current embedding progress status for a wordlist", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "ID of the wordlist to check embedding status for" + }, + "required": true, + "description": "ID of the wordlist to check embedding status for" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "progress": { + "type": "number", + "description": "Percentage of words that have been embedded (0-100)" + }, + "totalWords": { + "type": "number", + "description": "Total number of words in the wordlist" + }, + "remainingWords": { + "type": "number", + "description": "Number of words still waiting to be embedded" + } + }, + "required": [ + "progress", + "totalWords", + "remainingWords" + ], + "additionalProperties": false, + "description": "Embedding status details" + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist", + "x-speakeasy-name-override": "getEmbeddingStatus", + "x-speakeasy-mcp": { + "title": "Get embedding status", + "scopes": [ + "read" + ], + "readOnlyHint": true, + "destructiveHint": false + } + } + }, + "/wordlist/{id}/words": { + "post": { + "operationId": "addWordlistWords", + "summary": "Add words to wordlist", + "description": "Add words to an existing wordlist", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "ID of the wordlist to add words to" + }, + "required": true, + "description": "ID of the wordlist to add words to" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "words": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of words to add to the wordlist. Duplicate words will be ignored." + } + }, + "required": [ + "words" + ] + }, + "example": { + "words": [ + "free money", + "click here" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Words successfully added to wordlist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "addedCount": { + "type": "number", + "description": "Number of words added" + }, + "totalCount": { + "type": "number", + "description": "Total number of words in wordlist" + }, + "addedWords": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of words that were added" + } + }, + "required": [ + "addedCount", + "totalCount", + "addedWords" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist.words", + "x-speakeasy-name-override": "add", + "x-speakeasy-mcp": { + "title": "Add words to wordlist", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + }, + "delete": { + "operationId": "removeWordlistWords", + "summary": "Remove words from wordlist", + "description": "Remove words from an existing wordlist", + "tags": [ + "Wordlists" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "description": "ID of the wordlist to remove words from" + }, + "required": true, + "description": "ID of the wordlist to remove words from" + }, + { + "in": "query", + "name": "words", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of words to remove from the wordlist" + }, + "required": true, + "description": "Array of words to remove from the wordlist" + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "responses": { + "200": { + "description": "Words successfully removed from wordlist", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "removedCount": { + "type": "number", + "description": "Number of words removed" + }, + "totalCount": { + "type": "number", + "description": "Total number of words in wordlist" + }, + "removedWords": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of words removed" + } + }, + "required": [ + "removedCount", + "totalCount", + "removedWords" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "wordlist.words", + "x-speakeasy-name-override": "remove", + "x-speakeasy-mcp": { + "title": "Remove words from wordlist", + "scopes": [ + "destructive" + ], + "readOnlyHint": false, + "destructiveHint": true + } + } + }, + "/moderate": { + "post": { + "operationId": "submitContent", + "summary": "Submit content", + "tags": [ + "Content" + ], + "security": [ + { + "Authorization": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" + }, + "text": { + "type": "string", + "maxLength": 100000, + "description": "The content text" + } + }, + "required": [ + "type", + "text" + ], + "description": "Text", + "title": "Text" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image" + }, + "url": { + "description": "A public URL of the image content. Either url or data must be provided.", + "type": "string", + "format": "uri" + }, + "data": { + "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", + "type": "string", + "maxLength": 5500000 + } + }, + "required": [ + "type" + ], + "description": "Image", + "title": "Image" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "video" + }, + "url": { + "type": "string", + "format": "uri", + "description": "A public URL of the video content" + } + }, + "required": [ + "type", + "url" + ], + "description": "Video", + "title": "Video" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "audio" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the audio content" + } + }, + "required": [ + "type", + "url" + ], + "description": "Audio", + "title": "Audio" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "object" + }, + "data": { + "type": "object", + "propertyNames": { + "type": "string", + "description": "The key of the content node" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" + }, + "text": { + "type": "string", + "maxLength": 100000, + "description": "The content text" + } + }, + "required": [ + "type", + "text" + ], + "description": "Text", + "title": "Text" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image" + }, + "url": { + "description": "A public URL of the image content. Either url or data must be provided.", + "type": "string", + "format": "uri" + }, + "data": { + "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", + "type": "string", + "maxLength": 5500000 + } + }, + "required": [ + "type" + ], + "description": "Image", + "title": "Image" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "video" + }, + "url": { + "type": "string", + "format": "uri", + "description": "A public URL of the video content" + } + }, + "required": [ + "type", + "url" + ], + "description": "Video", + "title": "Video" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "audio" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the audio content" + } + }, + "required": [ + "type", + "url" + ], + "description": "Audio", + "title": "Audio" + } + ], + "title": "Content leaf", + "type": "object" + }, + "description": "Values in the object. Can be mixed content types." + } + }, + "required": [ + "type", + "data" + ], + "description": "Object", + "title": "Object" + } + ], + "description": "The content sent for moderation", + "type": "object" + }, + "timestamp": { + "description": "Unix timestamp (in milliseconds) of when the content was created. Use if content is not submitted in real-time.", + "type": "number" + }, + "channel": { + "description": "Provide a channel ID or key. Will use the project's default channel if not provided.", + "type": "string" + }, + "contentId": { + "description": "The unique ID of the content in your database.", + "type": "string", + "maxLength": 100 + }, + "metaType": { + "description": "The meta type of content being moderated", + "type": "string", + "enum": [ + "profile", + "message", + "post", + "comment", + "event", + "product", + "review", + "voice", + "other" + ] + }, + "authorId": { + "description": "The author of the content.", + "type": "string" + }, + "conversationId": { + "description": "For example the ID of a chat room or a post", + "type": "string" + }, + "metadata": { + "description": "Any metadata you want to store with the content", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "clientAction": { + "description": "A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content.", + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "review", + "allow", + "reject" + ], + "description": "Your recommendation for the content: allow, review, or reject." + }, + "behavior": { + "description": "How your recommendation combines with ours. Defaults to 'escalate', which only applies it when stricter than ours; 'override' replaces ours outright.", + "type": "string", + "enum": [ + "override", + "escalate" + ] + }, + "source": { + "description": "Where your recommendation came from, e.g. \"banned-ip\".", + "type": "string", + "maxLength": 100 + }, + "reason": { + "description": "A human-readable explanation for your recommendation.", + "type": "string", + "maxLength": 500 + } + }, + "required": [ + "action" + ] + }, + "doNotStore": { + "description": "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": { + "description": "(Enterprise) override the channel policies for this moderation request only.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "toxicity" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Toxicity" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "personal_information" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Personal Information" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "string", + "const": "hate" + } + }, + "required": [ + "flag", + "id" + ], + "title": "Hate" + }, + { + "type": "object", + "properties": { + "flag": { + "type": "boolean" + }, + "threshold": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "id": { "type": "string", "const": "illicit" } @@ -9776,10 +11263,10 @@ "x-speakeasy-mcp": { "title": "Update a project", "scopes": [ - "write" + "destructive" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": true } }, "delete": { @@ -9993,7 +11480,125 @@ "x-speakeasy-group": "projects", "x-speakeasy-name-override": "duplicate", "x-speakeasy-mcp": { - "title": "Duplicate a project", + "title": "Duplicate a project", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/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" ], @@ -10586,10 +12191,10 @@ "x-speakeasy-mcp": { "title": "Update a channel", "scopes": [ - "write" + "destructive" ], "readOnlyHint": false, - "destructiveHint": false + "destructiveHint": true } }, "delete": { @@ -10784,386 +12389,935 @@ "$ref": "#/components/schemas/AuthenticationError" } } - } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionDeniedError" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "429": { + "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RateLimitError" + } + } + } + } + }, + "x-speakeasy-group": "channels", + "x-speakeasy-name-override": "duplicate", + "x-speakeasy-mcp": { + "title": "Duplicate a channel", + "scopes": [ + "write" + ], + "readOnlyHint": false, + "destructiveHint": false + } + } + }, + "/stream": { + "get": { + "tags": [ + "Voice" + ], + "summary": "Real-time voice moderation stream (WebSocket)", + "description": "Open a WebSocket to moderate live voice/call audio in real time. Speech is transcribed and each finalized utterance is moderated by your enabled text policies; you receive a verdict per utterance as it's spoken.\n\n**This is a WebSocket upgrade, not a regular HTTP call.** The request body below documents the frames you *send* over the socket; the `101` response documents the events you *receive*.\n\n- **Auth:** `Authorization: Bearer ` on the upgrade. A missing/invalid key closes `4401`; voice not enabled on the plan/channel closes `4403`.\n- **Subprotocol:** request `moderationapi.v1`.\n- **Flow:** send one `start` frame, then `media` frames as audio arrives, then `stop` (or disconnect). You receive `session.started`, `utterance.final` per utterance, optional `utterance.partial`/`warning`, and `session.ended`.\n- **Close codes:** `1000` normal \u00b7 `1011` server error \u00b7 `4400` bad request \u00b7 `4401` auth failed \u00b7 `4403` voice not enabled \u00b7 `4429` concurrency limit.\n\nSee the [Real-time voice guide](https://docs.moderationapi.com/content-moderation/real-time-voice) for the full walkthrough and code examples.", + "servers": [ + { + "url": "wss://voice.moderationapi.com/v1", + "description": "Voice streaming gateway" + } + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "required": true, + "description": "Bearer ", + "schema": { + "type": "string" + } + }, + { + "name": "Sec-WebSocket-Protocol", + "in": "header", + "required": true, + "description": "Requested subprotocol.", + "schema": { + "type": "string", + "enum": [ + "moderationapi.v1" + ] + } + }, + { + "in": "header", + "name": "Project-Id", + "required": false, + "schema": { + "type": "string" + }, + "description": "The project to act on, 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" + } + ], + "requestBody": { + "description": "Frames sent by the client over the socket (not an HTTP body).", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/VoiceStartFrame" + }, + { + "$ref": "#/components/schemas/VoiceMediaFrame" + }, + { + "$ref": "#/components/schemas/VoiceStopFrame" + } + ], + "discriminator": { + "propertyName": "event" + } + } + } + } + }, + "responses": { + "101": { + "description": "Switching Protocols. The server then streams event frames over the socket; the key one is `utterance.final`.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/VoiceSessionStarted" + }, + { + "$ref": "#/components/schemas/VoiceUtteranceFinal" + }, + { + "$ref": "#/components/schemas/VoiceSessionEnded" + } + ], + "discriminator": { + "propertyName": "event" + } + } + } + } + } + }, + "x-webSocket": true, + "operationId": "streamVoice", + "x-speakeasy-ignore": true + } + } + }, + "components": { + "schemas": { + "PublicAuthor": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Author ID in Moderation API" + }, + "external_id": { + "description": "The author's ID from your system", + "type": [ + "string", + "null" + ] + }, + "profile_picture": { + "description": "URL of the author's profile picture", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "external_link": { + "description": "URL of the author's external profile", + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "name": { + "description": "Author name or identifier", + "type": [ + "string", + "null" + ] + }, + "email": { + "description": "Author email address", + "anyOf": [ + { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + { + "type": "null" + } + ] + }, + "company": { + "description": "The author's company or organization", + "type": [ + "string", + "null" + ] + }, + "first_seen": { + "type": "number", + "description": "Timestamp when author first appeared" + }, + "last_seen": { + "type": "number", + "description": "Timestamp of last activity" + }, + "last_incident": { + "description": "Timestamp of last incident", + "type": [ + "number", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "enabled", + "suspended", + "blocked" + ], + "description": "Current author status" + }, + "trust_level": { + "type": "object", + "properties": { + "level": { + "type": "number", + "description": "Author trust level (-1, 0, 1, 2, 3, or 4)" + }, + "manual": { + "type": "boolean", + "description": "True if the trust level was set manually by a moderator" + } + }, + "required": [ + "level", + "manual" + ], + "additionalProperties": false + }, + "block": { + "anyOf": [ + { + "type": "object", + "properties": { + "until": { + "description": "The timestamp until which they are blocked if the author is suspended.", + "type": [ + "number", + "null" + ] + }, + "reason": { + "description": "The moderators reason why the author was blocked or suspended.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" + } + ], + "description": "Block or suspension details, if applicable. Null if the author is enabled." }, - "403": { - "description": "Insufficient access", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PermissionDeniedError" - } + "risk_evaluation": { + "anyOf": [ + { + "type": "object", + "properties": { + "risk_level": { + "description": "Calculated risk level based on more than 10 behavioral signals.", + "anyOf": [ + { + "type": "number", + "minimum": 0, + "maximum": 100 + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "null" } - } + ], + "description": "Risk assessment details, if available." }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFoundError" - } + "metrics": { + "type": "object", + "properties": { + "total_content": { + "type": "number", + "description": "Total pieces of content" + }, + "flagged_content": { + "type": "number", + "description": "Number of flagged content pieces" + }, + "average_sentiment": { + "description": "Average sentiment score of content (-1 to 1). Requires a sentiment model in your project.", + "type": [ + "number", + "null" + ] } - } + }, + "required": [ + "total_content", + "flagged_content" + ], + "additionalProperties": false }, - "429": { - "description": "Too many requests. Retry after the number of seconds in the `Retry-After` header.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RateLimitError" - } + "metadata": { + "type": "object", + "properties": { + "email_verified": { + "description": "Whether the author's email is verified", + "type": [ + "boolean", + "null" + ] + }, + "phone_verified": { + "description": "Whether the author's phone number is verified", + "type": [ + "boolean", + "null" + ] + }, + "identity_verified": { + "description": "Whether the author's identity is verified", + "type": [ + "boolean", + "null" + ] + }, + "is_paying_customer": { + "description": "Whether the author is a paying customer", + "type": [ + "boolean", + "null" + ] } - } + }, + "additionalProperties": {}, + "description": "Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process." } }, - "x-speakeasy-group": "channels", - "x-speakeasy-name-override": "duplicate", - "x-speakeasy-mcp": { - "title": "Duplicate a channel", - "scopes": [ - "write" - ], - "readOnlyHint": false, - "destructiveHint": false - } - } - }, - "/stream": { - "get": { - "tags": [ - "Voice" + "required": [ + "id", + "first_seen", + "last_seen", + "status", + "trust_level", + "block", + "risk_evaluation", + "metrics", + "metadata" ], - "summary": "Real-time voice moderation stream (WebSocket)", - "description": "Open a WebSocket to moderate live voice/call audio in real time. Speech is transcribed and each finalized utterance is moderated by your enabled text policies; you receive a verdict per utterance as it's spoken.\n\n**This is a WebSocket upgrade, not a regular HTTP call.** The request body below documents the frames you *send* over the socket; the `101` response documents the events you *receive*.\n\n- **Auth:** `Authorization: Bearer ` on the upgrade. A missing/invalid key closes `4401`; voice not enabled on the plan/channel closes `4403`.\n- **Subprotocol:** request `moderationapi.v1`.\n- **Flow:** send one `start` frame, then `media` frames as audio arrives, then `stop` (or disconnect). You receive `session.started`, `utterance.final` per utterance, optional `utterance.partial`/`warning`, and `session.ended`.\n- **Close codes:** `1000` normal \u00b7 `1011` server error \u00b7 `4400` bad request \u00b7 `4401` auth failed \u00b7 `4403` voice not enabled \u00b7 `4429` concurrency limit.\n\nSee the [Real-time voice guide](https://docs.moderationapi.com/content-moderation/real-time-voice) for the full walkthrough and code examples.", - "servers": [ - { - "url": "wss://voice.moderationapi.com/v1", - "description": "Voice streaming gateway" + "additionalProperties": false + }, + "Queue": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The queue ID." + }, + "name": { + "type": "string", + "description": "The queue name." + }, + "description": { + "description": "The queue description.", + "type": [ + "string", + "null" + ] + }, + "isDefault": { + "type": "boolean", + "description": "Whether this is the default queue of the project." } + }, + "required": [ + "id", + "name", + "description", + "isDefault" ], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "required": true, - "description": "Bearer ", - "schema": { - "type": "string" - } + "additionalProperties": false + }, + "QueueWithCounts": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The queue ID." }, - { - "name": "Sec-WebSocket-Protocol", - "in": "header", - "required": true, - "description": "Requested subprotocol.", - "schema": { - "type": "string", - "enum": [ - "moderationapi.v1" - ] - } + "name": { + "type": "string", + "description": "The queue name." }, - { - "in": "header", - "name": "Project-Id", - "required": false, - "schema": { - "type": "string" - }, - "description": "The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.", - "x-speakeasy-name-override": "projectId" + "description": { + "description": "The queue description.", + "type": [ + "string", + "null" + ] + }, + "isDefault": { + "type": "boolean", + "description": "Whether this is the default queue of the project." + }, + "unresolvedItemsCount": { + "type": "integer", + "description": "Number of items that wait for review." + }, + "resolvedItemsCount": { + "type": "integer", + "description": "Number of items that are resolved." + }, + "totalItemsCount": { + "type": "integer", + "description": "Number of items in the queue, resolved and unresolved." } + }, + "required": [ + "id", + "name", + "description", + "isDefault", + "unresolvedItemsCount", + "resolvedItemsCount", + "totalItemsCount" ], - "requestBody": { - "description": "Frames sent by the client over the socket (not an HTTP body).", + "additionalProperties": false + }, + "QueueItem": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The item ID. Use it to resolve or unresolve the item in this queue." + }, + "contentId": { + "type": "string", + "description": "Your content ID, as you sent it to `POST /moderate`." + }, "content": { - "application/json": { - "schema": { + "anyOf": [ + { "oneOf": [ { - "$ref": "#/components/schemas/VoiceStartFrame" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" + }, + "text": { + "type": "string", + "maxLength": 100000, + "description": "The content text" + } + }, + "required": [ + "type", + "text" + ], + "additionalProperties": false, + "description": "Text", + "title": "Text" }, { - "$ref": "#/components/schemas/VoiceMediaFrame" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image" + }, + "url": { + "description": "A public URL of the image content. Either url or data must be provided.", + "type": "string", + "format": "uri" + }, + "data": { + "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", + "type": "string", + "maxLength": 5500000 + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Image", + "title": "Image" }, { - "$ref": "#/components/schemas/VoiceStopFrame" + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "video" + }, + "url": { + "type": "string", + "format": "uri", + "description": "A public URL of the video content" + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false, + "description": "Video", + "title": "Video" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "audio" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the audio content" + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false, + "description": "Audio", + "title": "Audio" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "object" + }, + "data": { + "type": "object", + "propertyNames": { + "type": "string", + "description": "The key of the content node" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" + }, + "text": { + "type": "string", + "maxLength": 100000, + "description": "The content text" + } + }, + "required": [ + "type", + "text" + ], + "additionalProperties": false, + "description": "Text", + "title": "Text" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "image" + }, + "url": { + "description": "A public URL of the image content. Either url or data must be provided.", + "type": "string", + "format": "uri" + }, + "data": { + "description": "Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue.", + "type": "string", + "maxLength": 5500000 + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Image", + "title": "Image" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "video" + }, + "url": { + "type": "string", + "format": "uri", + "description": "A public URL of the video content" + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false, + "description": "Video", + "title": "Video" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "audio" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the audio content" + } + }, + "required": [ + "type", + "url" + ], + "additionalProperties": false, + "description": "Audio", + "title": "Audio" + } + ], + "title": "Content leaf", + "type": "object" + }, + "description": "Values in the object. Can be mixed content types." + } + }, + "required": [ + "type", + "data" + ], + "additionalProperties": false, + "description": "Object", + "title": "Object" } ], - "discriminator": { - "propertyName": "event" - } + "type": "object" + }, + { + "type": "null" } - } - } - }, - "responses": { - "101": { - "description": "Switching Protocols. The server then streams event frames over the socket; the key one is `utterance.final`.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/VoiceSessionStarted" - }, - { - "$ref": "#/components/schemas/VoiceUtteranceFinal" + ], + "description": "The submitted content." + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "description": "The label name" + }, + "score": { + "type": "number", + "description": "Confidence score between 0 and 1" + }, + "manual": { + "description": "True if the label was applied manually by a moderator", + "type": "boolean" + }, + "flagged": { + "description": "Whether this label crossed its flagging threshold", + "type": "boolean" + }, + "shadow_flagged": { + "description": "Whether this label crossed its threshold under a shadowed policy \u2014 reported for visibility, never counted toward a flagging decision", + "type": "boolean" + }, + "matches": { + "type": "array", + "items": { + "type": "object", + "properties": { + "match": { + "type": "string", + "description": "The matched substring" + }, + "probability": { + "type": "number", + "description": "Match confidence between 0 and 1" + }, + "span": { + "type": "array", + "prefixItems": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "items": false, + "minItems": 2, + "maxItems": 2, + "description": "[start, end] character offsets in the source text" + }, + "mask": { + "type": [ + "string", + "null" + ] + }, + "reasons": { + "type": "array", + "items": { + "type": "string" + } + }, + "signals": { + "type": "object", + "properties": { + "brand_impersonation": { + "anyOf": [ + { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "method": { + "type": "string" + } + }, + "required": [ + "brand", + "method" + ], + "additionalProperties": false + }, + { + "type": "null" + } + ] + }, + "has_suspicious_characters": { + "type": "boolean" + }, + "is_link_shortener": { + "type": "boolean" + }, + "domain_age_days": { + "type": [ + "number", + "null" + ] + }, + "has_email_setup": { + "type": [ + "boolean", + "null" + ] + }, + "redirect_count": { + "type": [ + "number", + "null" + ] + }, + "final_url": { + "type": [ + "string", + "null" + ] + }, + "bot_protection": { + "type": [ + "boolean", + "null" + ] + }, + "is_reported": { + "type": "boolean" + } + }, + "required": [ + "brand_impersonation", + "has_suspicious_characters", + "is_link_shortener", + "domain_age_days", + "has_email_setup", + "redirect_count", + "final_url", + "bot_protection", + "is_reported" + ], + "additionalProperties": false + }, + "entity_type": { + "type": "string" + }, + "scripts": { + "type": "array", + "items": { + "type": "string" + } + }, + "skeleton": { + "type": "string" + } }, - { - "$ref": "#/components/schemas/VoiceSessionEnded" - } - ], - "discriminator": { - "propertyName": "event" + "required": [ + "match", + "probability", + "span" + ], + "additionalProperties": false } - } - } - } - } - }, - "x-webSocket": true, - "operationId": "streamVoice", - "x-speakeasy-ignore": true - } - } - }, - "components": { - "schemas": { - "PublicAuthor": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Author ID in Moderation API" + } + }, + "required": [ + "label", + "score" + ], + "additionalProperties": false + }, + "description": "The moderation labels of the content." }, - "external_id": { - "description": "The author's ID from your system", + "flagged": { + "type": "boolean", + "description": "Whether moderation flagged the content." + }, + "severity": { + "description": "Severity score from 0 to 1, if available.", "type": [ - "string", + "number", "null" ] }, - "profile_picture": { - "description": "URL of the author's profile picture", - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "null" - } - ] + "status": { + "type": "string", + "enum": [ + "pending", + "resolved" + ], + "description": "`pending` waits for review. `resolved` is reviewed." }, - "external_link": { - "description": "URL of the author's external profile", - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "null" - } - ] + "timestamp": { + "type": "number", + "description": "When the content was submitted, as Unix time in milliseconds." }, - "name": { - "description": "Author name or identifier", + "language": { + "description": "Detected ISO language code.", "type": [ "string", "null" ] }, - "email": { - "description": "Author email address", - "anyOf": [ - { - "type": "string", - "format": "email", - "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" - }, - { - "type": "null" - } + "conversationId": { + "description": "Conversation ID, if any.", + "type": [ + "string", + "null" ] }, - "company": { - "description": "The author's company or organization", + "authorId": { + "description": "Your author ID, if any.", "type": [ "string", "null" ] }, - "first_seen": { - "type": "number", - "description": "Timestamp when author first appeared" - }, - "last_seen": { - "type": "number", - "description": "Timestamp of last activity" - }, - "last_incident": { - "description": "Timestamp of last incident", + "contentType": { + "description": "Content type, for example `message` or `profile`.", "type": [ - "number", + "string", "null" ] - }, - "status": { - "type": "string", - "enum": [ - "enabled", - "suspended", - "blocked" - ], - "description": "Current author status" - }, - "trust_level": { - "type": "object", - "properties": { - "level": { - "type": "number", - "description": "Author trust level (-1, 0, 1, 2, 3, or 4)" - }, - "manual": { - "type": "boolean", - "description": "True if the trust level was set manually by a moderator" - } - }, - "required": [ - "level", - "manual" - ], - "additionalProperties": false - }, - "block": { - "anyOf": [ - { - "type": "object", - "properties": { - "until": { - "description": "The timestamp until which they are blocked if the author is suspended.", - "type": [ - "number", - "null" - ] - }, - "reason": { - "description": "The moderators reason why the author was blocked or suspended.", - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ], - "description": "Block or suspension details, if applicable. Null if the author is enabled." - }, - "risk_evaluation": { - "anyOf": [ - { - "type": "object", - "properties": { - "risk_level": { - "description": "Calculated risk level based on more than 10 behavioral signals.", - "anyOf": [ - { - "type": "number", - "minimum": 0, - "maximum": 100 - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false - }, - { - "type": "null" - } - ], - "description": "Risk assessment details, if available." - }, - "metrics": { - "type": "object", - "properties": { - "total_content": { - "type": "number", - "description": "Total pieces of content" - }, - "flagged_content": { - "type": "number", - "description": "Number of flagged content pieces" - }, - "average_sentiment": { - "description": "Average sentiment score of content (-1 to 1). Requires a sentiment model in your project.", - "type": [ - "number", - "null" - ] - } - }, - "required": [ - "total_content", - "flagged_content" - ], - "additionalProperties": false - }, - "metadata": { - "type": "object", - "properties": { - "email_verified": { - "description": "Whether the author's email is verified", - "type": [ - "boolean", - "null" - ] - }, - "phone_verified": { - "description": "Whether the author's phone number is verified", - "type": [ - "boolean", - "null" - ] - }, - "identity_verified": { - "description": "Whether the author's identity is verified", - "type": [ - "boolean", - "null" - ] - }, - "is_paying_customer": { - "description": "Whether the author is a paying customer", - "type": [ - "boolean", - "null" - ] - } - }, - "additionalProperties": {}, - "description": "Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process." } }, "required": [ "id", - "first_seen", - "last_seen", + "contentId", + "content", + "labels", + "flagged", + "severity", "status", - "trust_level", - "block", - "risk_evaluation", - "metrics", - "metadata" + "timestamp", + "language", + "conversationId", + "authorId", + "contentType" ], "additionalProperties": false }, @@ -11314,6 +13468,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 +15742,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": { @@ -13716,13 +15904,14 @@ "action_not_found", "author_not_found", "queue_not_found", + "queue_item_not_found", "wordlist_not_found", "webhook_not_found", "project_not_found", "channel_not_found" ], "x-speakeasy-unknown-values": "allow", - "description": "Exactly what went wrong. Stable; safe to branch on. New codes may be added.\n\n- `resource_not_found`: The resource does not exist.\n- `action_not_found`: The action does not exist.\n- `author_not_found`: The author does not exist.\n- `queue_not_found`: The review queue does not exist.\n- `wordlist_not_found`: The wordlist does not exist.\n- `webhook_not_found`: The webhook does not exist.\n- `project_not_found`: The project does not exist.\n- `channel_not_found`: The channel does not exist.", + "description": "Exactly what went wrong. Stable; safe to branch on. New codes may be added.\n\n- `resource_not_found`: The resource does not exist.\n- `action_not_found`: The action does not exist.\n- `author_not_found`: The author does not exist.\n- `queue_not_found`: The review queue does not exist.\n- `queue_item_not_found`: The queue item does not exist in the project.\n- `wordlist_not_found`: The wordlist does not exist.\n- `webhook_not_found`: The webhook does not exist.\n- `project_not_found`: The project does not exist.\n- `channel_not_found`: The channel does not exist.", "example": "resource_not_found" }, "message": { diff --git a/CHANGELOG.md b/CHANGELOG.md index 58f34b60..221e7339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,141 @@ # Changelog +## 3.2.0 (2026-10-26) + +Full Changelog: [v3.1.1...v3.2.0](https://github.com/moderation-api/sdk-ruby/compare/v3.1.1...v3.2.0) + +### ⚠ Breaking changes + +- `GET /authors`: removed the enum value `reportCount` from the `query` request parameter `sortBy` +- `GET /queue/{id}`: the response property `queue/description` became nullable for the status `200` +- `GET /queue/{id}`: removed the required property `queue/filter` from the response with the `200` status +- `GET /queue/{id}/items`: added `subschema #1, subschema #2` to the `data/items/content` response property `anyOf` list for the response status `200` +- `GET /queue/{id}/items`: the response property `data/items/authorId` became nullable for the status `200` +- `GET /queue/{id}/items`: the response property `data/items/contentType` became nullable for the status `200` +- `GET /queue/{id}/items`: the response property `data/items/conversationId` became nullable for the status `200` +- `GET /queue/{id}/items`: the response property `data/items/language` became nullable for the status `200` +- `GET /queue/{id}/items`: the response property `data/items/labels/items/flagged` became optional for the status `200` +- `GET /queue/{id}/items`: the `data/items/content` response's property `type` changed from `string` to `any` for status `200` +- `POST /queue/{id}/items/{itemId}/resolve`: removed the request body +- `POST /queue/{id}/items/{itemId}/unresolve`: removed the request body +- `GET /queue/{id}/stats`: the response property `topReviewers/items/name` became nullable for the status `200` +- `GET /queue/{id}/stats`: the response property `topReviewers/items/userId` became nullable for the status `200` +- `GET /queue/{id}/stats`: removed the required property `actionStats` from the response with the `200` status +- `GET /queue/{id}/stats`: removed the required property `reviewStats/averageTimeToReview` from the response with the `200` status +- `GET /queue/{id}/stats`: removed the required property `topReviewers/items/averageTimePerReview` from the response with the `200` status +- `GET /queue/{id}/stats`: removed the required property `topReviewers/items/topActions` from the response with the `200` status +- `GET /queue/{id}/stats`: removed the required property `trends/flaggedContentTrends` from the response with the `200` status + +### API changes + +- `GET /actions`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /actions`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `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/execute`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `POST /actions/{actionId}/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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `DELETE /actions/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `DELETE /actions/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `PUT /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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /auth`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /auth`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `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` +- `GET /authors`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `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` +- `DELETE /authors/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `PUT /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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `DELETE /channels/{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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /channels/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `PUT /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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `POST /channels/{id}/duplicate`: 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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `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` +- `DELETE /projects/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /projects/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `PUT /projects/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `PUT /projects/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `POST /projects/{id}/duplicate`: 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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /projects/{projectId}/channels`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `POST /projects/{projectId}/channels`: 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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /queue/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /queue/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /queue/{id}/items`: 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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `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` +- `GET /queue/{id}/stats`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `POST /webhooks`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `DELETE /webhooks/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /webhooks/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `PUT /webhooks/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `PUT /webhooks/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /wordlist`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /wordlist`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /wordlist/{id}`: added the new `project_name_ambiguous` enum value to the `code` response property for the response status `400` +- `GET /wordlist/{id}`: added the new `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `PUT /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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /wordlist/{id}/embedding-status`: 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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `DELETE /wordlist/{id}/words`: 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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `POST /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 `queue_item_not_found` enum value to the `code` response property for the response status `404` +- `GET /authors`: deleted the `query` request parameter `contentTypes` +- `GET /queue/{id}/items`: deleted the `query` request parameter `sortDirection` +- `GET /queue/{id}/items`: deleted the `query` request parameter `sortField` +- a breaking change was detected but the version is still `1.1.0` +- `GET /analytics/authors`: endpoint added +- `GET /analytics/automation`: endpoint added +- `GET /analytics/channels`: endpoint added +- `GET /analytics/policies`: endpoint added +- `GET /analytics/summary`: endpoint added +- `GET /analytics/volumes`: endpoint added +- `POST /feedback`: endpoint added +- `POST /projects/{id}/api-keys`: endpoint added +- `GET /queue`: endpoint added +- `GET /queue/{id}`: the `queue/resolvedItemsCount` response's property `type` was narrowed from `number` to `integer` for status `200` +- `GET /queue/{id}`: the `queue/totalItemsCount` response's property `type` was narrowed from `number` to `integer` for status `200` +- `GET /queue/{id}`: the `queue/unresolvedItemsCount` response's property `type` was narrowed from `number` to `integer` for status `200` +- `GET /queue/{id}`: added the required property `queue/isDefault` to the response with the `200` status +- `GET /queue/{id}/items`: added the new optional `query` request parameter `sort` +- `GET /queue/{id}/items`: added the optional property `data/items/labels/items/manual` to the response with the `200` status +- `GET /queue/{id}/items`: added the optional property `data/items/labels/items/matches` to the response with the `200` status +- `GET /queue/{id}/items`: added the optional property `data/items/labels/items/shadow_flagged` to the response with the `200` status +- `GET /queue/{id}/items`: removed the optional property `data/items/actions` from the response with the `200` status +- `GET /queue/{id}/items`: the response property `data/items/authorId` became required for the status `200` +- `GET /queue/{id}/items`: the response property `data/items/contentType` became required for the status `200` +- `GET /queue/{id}/items`: the response property `data/items/conversationId` became required for the status `200` +- `GET /queue/{id}/items`: the response property `data/items/language` became required for the status `200` +- `GET /queue/{id}/items`: added the required property `data/items/contentId` to the response with the `200` status +- `GET /queue/{id}/items`: added the required property `data/items/severity` to the response with the `200` status +- `POST /queue/{id}/items/resolve`: endpoint added +- `POST /queue/{id}/items/{itemId}/resolve`: removed the optional property `comment` from the response with the `200` status +- `POST /queue/{id}/items/{itemId}/unresolve`: the `status` response property for the response status `200` was restricted to a list of enum values +- `GET /queue/{id}/stats`: removed the optional property `topReviewers/items/accuracyScore` from the response with the `200` status +- `GET /queue/{id}/stats`: the `reviewStats/totalPending` response's property `type` was narrowed from `number` to `integer` for status `200` +- `GET /queue/{id}/stats`: the `reviewStats/totalReviewed` response's property `type` was narrowed from `number` to `integer` for status `200` +- `GET /queue/{id}/stats`: the `topReviewers/items/reviewCount` response's property `type` was narrowed from `number` to `integer` for status `200` +- `GET /queue/{id}/stats`: the `trends/dailyReviewCounts/items/count` response's property `type` was narrowed from `number` to `integer` for status `200` +- `POST /wordlist`: endpoint added + ## 3.1.1 (2026-10-22) Full Changelog: [v3.1.0...v3.1.1](https://github.com/moderation-api/sdk-ruby/compare/v3.1.0...v3.1.1) diff --git a/Gemfile.lock b/Gemfile.lock index 8cfbc005..3aa290b4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - moderation_api (3.1.1) + moderation_api (3.2.0) faraday faraday-multipart faraday-retry diff --git a/README.md b/README.md index 4fca33ee..8f30aa79 100644 --- a/README.md +++ b/README.md @@ -199,9 +199,7 @@ Models = ::ModerationApi::Models s = ::ModerationApi::ModerationApi.new( secret_key: "" ) - -req = Models::Operations::ListAuthorsRequest.new -res = s.authors.list(request: req) +res = s.analytics.summary(range: Models::Operations::GetAnalyticsSummaryQueryParamRange::THIRTYD) unless res.object.nil? # handle response @@ -215,9 +213,9 @@ end 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: ```ruby require "moderation_api" @@ -256,6 +254,15 @@ Create the organization client only where you manage projects and channels, for * [delete](docs/sdks/actions/README.md#delete) - Delete an action * [execute](docs/sdks/actions/README.md#execute) - Execute moderation action +### [Analytics](docs/sdks/analytics/README.md) + +* [summary](docs/sdks/analytics/README.md#summary) - Get the analytics summary +* [policies](docs/sdks/analytics/README.md#policies) - Get the most flagged policies +* [authors](docs/sdks/analytics/README.md#authors) - Get the most flagged authors +* [channels](docs/sdks/analytics/README.md#channels) - Get analytics per channel +* [volumes](docs/sdks/analytics/README.md#volumes) - Get volumes over time +* [automation](docs/sdks/analytics/README.md#automation) - Get the automation breakdown + ### [Authors](docs/sdks/authors/README.md) * [list](docs/sdks/authors/README.md#list) - List authors @@ -277,6 +284,10 @@ Create the organization client only where you manage projects and channels, for * [submit](docs/sdks/content/README.md#submit) - Submit content +### [Feedback](docs/sdks/feedback/README.md) + +* [create](docs/sdks/feedback/README.md#create) - Send feedback + ### [Projects](docs/sdks/projects/README.md) * [list](docs/sdks/projects/README.md#list) - List projects @@ -286,15 +297,21 @@ 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/queue/README.md) +* [list](docs/sdks/queue/README.md#list) - List queues * [retrieve](docs/sdks/queue/README.md#retrieve) - Get a queue * [get_stats](docs/sdks/queue/README.md#get_stats) - Get queue statistics #### [Queue.Items](docs/sdks/items/README.md) -* [list](docs/sdks/items/README.md#list) - Get queue items +* [list](docs/sdks/items/README.md#list) - List queue items * [resolve](docs/sdks/items/README.md#resolve) - Resolve a queue item +* [resolve_many](docs/sdks/items/README.md#resolve_many) - Resolve queue items * [unresolve](docs/sdks/items/README.md#unresolve) - Unresolve a queue item ### [Webhooks](docs/sdks/webhooks/README.md) @@ -312,6 +329,7 @@ Create the organization client only where you manage projects and channels, for ### [Wordlist](docs/sdks/wordlist/README.md) * [list](docs/sdks/wordlist/README.md#list) - List wordlists +* [create](docs/sdks/wordlist/README.md#create) - Create wordlist * [retrieve](docs/sdks/wordlist/README.md#retrieve) - Get wordlist * [update](docs/sdks/wordlist/README.md#update) - Update wordlist * [get_embedding_status](docs/sdks/wordlist/README.md#get_embedding_status) - Get embedding status @@ -338,7 +356,7 @@ By default an API error will raise a `Errors::APIError`, which has the following | `raw_response` | *Faraday::Response* | The raw HTTP response | | `body` | *string* | The response content | -When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `list` method throws the following exceptions: +When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `summary` method throws the following exceptions: | Error Type | Status Code | Content Type | | ------------------------------------- | ----------- | ---------------- | @@ -361,8 +379,7 @@ s = ::ModerationApi::ModerationApi.new( ) begin - req = Models::Operations::ListAuthorsRequest.new - res = s.authors.list(request: req) + res = s.analytics.summary(range: Models::Operations::GetAnalyticsSummaryQueryParamRange::THIRTYD) unless res.object.nil? # handle response @@ -408,9 +425,7 @@ s = ::ModerationApi::ModerationApi.new( server_url: "https://api.moderationapi.com/v1", secret_key: "" ) - -req = Models::Operations::ListAuthorsRequest.new -res = s.authors.list(request: req) +res = s.analytics.summary(range: Models::Operations::GetAnalyticsSummaryQueryParamRange::THIRTYD) unless res.object.nil? # handle response diff --git a/docs/models/components/badrequesterrorcode.md b/docs/models/components/badrequesterrorcode.md index c0b14325..b6f07d45 100644 --- a/docs/models/components/badrequesterrorcode.md +++ b/docs/models/components/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 @@ -20,8 +21,9 @@ custom = BadRequestErrorCode.deserialize("custom_value") ## Values -| Name | Value | -| --------------------- | --------------------- | -| `INVALID_REQUEST` | invalid_request | -| `PROJECT_ID_REQUIRED` | project_id_required | -| `VALIDATION_FAILED` | validation_failed | \ No newline at end of file +| Name | Value | +| ------------------------ | ------------------------ | +| `INVALID_REQUEST` | invalid_request | +| `PROJECT_ID_REQUIRED` | project_id_required | +| `PROJECT_NAME_AMBIGUOUS` | project_name_ambiguous | +| `VALIDATION_FAILED` | validation_failed | \ No newline at end of file diff --git a/docs/models/components/label.md b/docs/models/components/label.md new file mode 100644 index 00000000..9f28e25c --- /dev/null +++ b/docs/models/components/label.md @@ -0,0 +1,13 @@ +# Label + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `label` | *::String* | :heavy_check_mark: | The label name | +| `score` | *::Float* | :heavy_check_mark: | Confidence score between 0 and 1 | +| `manual` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | True if the label was applied manually by a moderator | +| `flagged` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether this label crossed its flagging threshold | +| `shadow_flagged` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Whether this label crossed its threshold under a shadowed policy — reported for visibility, never counted toward a flagging decision | +| `matches` | T::Array<[Models::Components::QueueItemMatch](../../models/shared/queueitemmatch.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/notfounderrorcode.md b/docs/models/components/notfounderrorcode.md index e5c6026d..ff56ff62 100644 --- a/docs/models/components/notfounderrorcode.md +++ b/docs/models/components/notfounderrorcode.md @@ -6,6 +6,7 @@ Exactly what went wrong. Stable; safe to branch on. New codes may be added. - `action_not_found`: The action does not exist. - `author_not_found`: The author does not exist. - `queue_not_found`: The review queue does not exist. +- `queue_item_not_found`: The queue item does not exist in the project. - `wordlist_not_found`: The wordlist does not exist. - `webhook_not_found`: The webhook does not exist. - `project_not_found`: The project does not exist. @@ -25,13 +26,14 @@ custom = NotFoundErrorCode.deserialize("custom_value") ## Values -| Name | Value | -| -------------------- | -------------------- | -| `RESOURCE_NOT_FOUND` | resource_not_found | -| `ACTION_NOT_FOUND` | action_not_found | -| `AUTHOR_NOT_FOUND` | author_not_found | -| `QUEUE_NOT_FOUND` | queue_not_found | -| `WORDLIST_NOT_FOUND` | wordlist_not_found | -| `WEBHOOK_NOT_FOUND` | webhook_not_found | -| `PROJECT_NOT_FOUND` | project_not_found | -| `CHANNEL_NOT_FOUND` | channel_not_found | \ No newline at end of file +| Name | Value | +| ---------------------- | ---------------------- | +| `RESOURCE_NOT_FOUND` | resource_not_found | +| `ACTION_NOT_FOUND` | action_not_found | +| `AUTHOR_NOT_FOUND` | author_not_found | +| `QUEUE_NOT_FOUND` | queue_not_found | +| `QUEUE_ITEM_NOT_FOUND` | queue_item_not_found | +| `WORDLIST_NOT_FOUND` | wordlist_not_found | +| `WEBHOOK_NOT_FOUND` | webhook_not_found | +| `PROJECT_NOT_FOUND` | project_not_found | +| `CHANNEL_NOT_FOUND` | channel_not_found | \ No newline at end of file diff --git a/docs/models/components/projectapikey.md b/docs/models/components/projectapikey.md new file mode 100644 index 00000000..b400abb2 --- /dev/null +++ b/docs/models/components/projectapikey.md @@ -0,0 +1,12 @@ +# ProjectApiKey + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the API key. | +| `name` | *::String* | :heavy_check_mark: | The key's name. | +| `project_id` | *::String* | :heavy_check_mark: | The ID of the project the key belongs to. | +| `created_at` | *::String* | :heavy_check_mark: | When the key was created. | +| `secret_key` | *::String* | :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/components/publicauthor.md b/docs/models/components/publicauthor.md index 2f21d8a4..6af326e9 100644 --- a/docs/models/components/publicauthor.md +++ b/docs/models/components/publicauthor.md @@ -15,7 +15,7 @@ | `first_seen` | *::Float* | :heavy_check_mark: | Timestamp when author first appeared | | `last_seen` | *::Float* | :heavy_check_mark: | Timestamp of last activity | | `last_incident` | *T.nilable(::Float)* | :heavy_minus_sign: | Timestamp of last incident | -| `status` | [Models::Components::Status](../../models/shared/status.md) | :heavy_check_mark: | Current author status | +| `status` | [Models::Components::PublicAuthorStatus](../../models/shared/publicauthorstatus.md) | :heavy_check_mark: | Current author status | | `trust_level` | [Models::Components::TrustLevel](../../models/shared/trustlevel.md) | :heavy_check_mark: | N/A | | `block` | [T.nilable(Models::Components::Block)](../../models/shared/block.md) | :heavy_check_mark: | Block or suspension details, if applicable. Null if the author is enabled. | | `risk_evaluation` | [T.nilable(Models::Components::RiskEvaluation)](../../models/shared/riskevaluation.md) | :heavy_check_mark: | Risk assessment details, if available. | diff --git a/docs/models/components/status.md b/docs/models/components/publicauthorstatus.md similarity index 73% rename from docs/models/components/status.md rename to docs/models/components/publicauthorstatus.md index 8ae5c07a..976c1e4a 100644 --- a/docs/models/components/status.md +++ b/docs/models/components/publicauthorstatus.md @@ -1,4 +1,4 @@ -# Status +# PublicAuthorStatus Current author status @@ -7,10 +7,10 @@ Current author status ```ruby require "moderation_api" -value = Status::ENABLED +value = PublicAuthorStatus::ENABLED # Open enum: use .deserialize() to create instances from custom string values -custom = Status.deserialize("custom_value") +custom = PublicAuthorStatus.deserialize("custom_value") ``` diff --git a/docs/models/components/queue.md b/docs/models/components/queue.md new file mode 100644 index 00000000..b1f70277 --- /dev/null +++ b/docs/models/components/queue.md @@ -0,0 +1,11 @@ +# Queue + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `name` | *::String* | :heavy_check_mark: | The queue name. | +| `description` | *T.nilable(::String)* | :heavy_check_mark: | The queue description. | +| `is_default` | *T::Boolean* | :heavy_check_mark: | Whether this is the default queue of the project. | \ No newline at end of file diff --git a/docs/models/components/queueitem.md b/docs/models/components/queueitem.md new file mode 100644 index 00000000..6ffe56d5 --- /dev/null +++ b/docs/models/components/queueitem.md @@ -0,0 +1,19 @@ +# QueueItem + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The item ID. Use it to resolve or unresolve the item in this queue. | +| `content_id` | *::String* | :heavy_check_mark: | Your content ID, as you sent it to `POST /moderate`. | +| `content` | [T.nilable(T.any(Models::Components::QueueItemText, Models::Components::QueueItemImage, Models::Components::QueueItemVideo, Models::Components::QueueItemAudio, Models::Components::QueueItemObject))](../../models/shared/queueitemcontent.md) | :heavy_check_mark: | The submitted content. | +| `labels` | T::Array<[Models::Components::Label](../../models/shared/label.md)> | :heavy_check_mark: | The moderation labels of the content. | +| `flagged` | *T::Boolean* | :heavy_check_mark: | Whether moderation flagged the content. | +| `severity` | *T.nilable(::Float)* | :heavy_check_mark: | Severity score from 0 to 1, if available. | +| `status` | [Models::Components::QueueItemStatus](../../models/shared/queueitemstatus.md) | :heavy_check_mark: | `pending` waits for review. `resolved` is reviewed. | +| `timestamp` | *::Float* | :heavy_check_mark: | When the content was submitted, as Unix time in milliseconds. | +| `language` | *T.nilable(::String)* | :heavy_check_mark: | Detected ISO language code. | +| `conversation_id` | *T.nilable(::String)* | :heavy_check_mark: | Conversation ID, if any. | +| `author_id` | *T.nilable(::String)* | :heavy_check_mark: | Your author ID, if any. | +| `content_type` | *T.nilable(::String)* | :heavy_check_mark: | Content type, for example `message` or `profile`. | \ No newline at end of file diff --git a/docs/models/components/queueitemaudio.md b/docs/models/components/queueitemaudio.md new file mode 100644 index 00000000..bac06951 --- /dev/null +++ b/docs/models/components/queueitemaudio.md @@ -0,0 +1,11 @@ +# QueueItemAudio + +Audio + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `url` | *::String* | :heavy_check_mark: | The URL of the audio content | \ No newline at end of file diff --git a/docs/models/operations/metadatafilter.md b/docs/models/components/queueitembrandimpersonation.md similarity index 59% rename from docs/models/operations/metadatafilter.md rename to docs/models/components/queueitembrandimpersonation.md index c561897e..33454aa4 100644 --- a/docs/models/operations/metadatafilter.md +++ b/docs/models/components/queueitembrandimpersonation.md @@ -1,9 +1,9 @@ -# MetadataFilter +# QueueItemBrandImpersonation ## Fields | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *::String* | :heavy_check_mark: | N/A | -| `value` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file +| `brand` | *::String* | :heavy_check_mark: | N/A | +| `method` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/queueitemcontent.md b/docs/models/components/queueitemcontent.md new file mode 100644 index 00000000..d5df7ab3 --- /dev/null +++ b/docs/models/components/queueitemcontent.md @@ -0,0 +1,2 @@ +# QueueItemContent + diff --git a/docs/models/components/queueitemcontentleaf.md b/docs/models/components/queueitemcontentleaf.md new file mode 100644 index 00000000..9d16de4e --- /dev/null +++ b/docs/models/components/queueitemcontentleaf.md @@ -0,0 +1,2 @@ +# QueueItemContentLeaf + diff --git a/docs/models/components/queueitemcontentleafaudio.md b/docs/models/components/queueitemcontentleafaudio.md new file mode 100644 index 00000000..97189e52 --- /dev/null +++ b/docs/models/components/queueitemcontentleafaudio.md @@ -0,0 +1,11 @@ +# QueueItemContentLeafAudio + +Audio + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `url` | *::String* | :heavy_check_mark: | The URL of the audio content | \ No newline at end of file diff --git a/docs/models/components/queueitemcontentleafimage.md b/docs/models/components/queueitemcontentleafimage.md new file mode 100644 index 00000000..0696a1a8 --- /dev/null +++ b/docs/models/components/queueitemcontentleafimage.md @@ -0,0 +1,12 @@ +# QueueItemContentLeafImage + +Image + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `url` | *T.nilable(::String)* | :heavy_minus_sign: | A public URL of the image content. Either url or data must be provided. | +| `data` | *T.nilable(::String)* | :heavy_minus_sign: | Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue. | \ No newline at end of file diff --git a/docs/models/components/queueitemcontentleaftext.md b/docs/models/components/queueitemcontentleaftext.md new file mode 100644 index 00000000..7d1cfb05 --- /dev/null +++ b/docs/models/components/queueitemcontentleaftext.md @@ -0,0 +1,11 @@ +# QueueItemContentLeafText + +Text + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `text` | *::String* | :heavy_check_mark: | The content text | \ No newline at end of file diff --git a/docs/models/components/queueitemcontentleafvideo.md b/docs/models/components/queueitemcontentleafvideo.md new file mode 100644 index 00000000..f1233225 --- /dev/null +++ b/docs/models/components/queueitemcontentleafvideo.md @@ -0,0 +1,11 @@ +# QueueItemContentLeafVideo + +Video + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `url` | *::String* | :heavy_check_mark: | A public URL of the video content | \ No newline at end of file diff --git a/docs/models/components/queueitemimage.md b/docs/models/components/queueitemimage.md new file mode 100644 index 00000000..5c10d346 --- /dev/null +++ b/docs/models/components/queueitemimage.md @@ -0,0 +1,12 @@ +# QueueItemImage + +Image + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `url` | *T.nilable(::String)* | :heavy_minus_sign: | A public URL of the image content. Either url or data must be provided. | +| `data` | *T.nilable(::String)* | :heavy_minus_sign: | Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue. | \ No newline at end of file diff --git a/docs/models/components/queueitemmatch.md b/docs/models/components/queueitemmatch.md new file mode 100644 index 00000000..6cf04e68 --- /dev/null +++ b/docs/models/components/queueitemmatch.md @@ -0,0 +1,16 @@ +# QueueItemMatch + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `match` | *::String* | :heavy_check_mark: | The matched substring | +| `probability` | *::Float* | :heavy_check_mark: | Match confidence between 0 and 1 | +| `span` | T::Array<*::Float*> | :heavy_check_mark: | [start, end] character offsets in the source text | +| `mask` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `reasons` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `signals` | [T.nilable(Models::Components::QueueItemSignals)](../../models/shared/queueitemsignals.md) | :heavy_minus_sign: | N/A | +| `entity_type` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `scripts` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `skeleton` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/queueitemobject.md b/docs/models/components/queueitemobject.md new file mode 100644 index 00000000..81592870 --- /dev/null +++ b/docs/models/components/queueitemobject.md @@ -0,0 +1,11 @@ +# QueueItemObject + +Object + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `data` | T::Hash[Symbol, [T.any(Models::Components::QueueItemContentLeafText, Models::Components::QueueItemContentLeafImage, Models::Components::QueueItemContentLeafVideo, Models::Components::QueueItemContentLeafAudio)](../../models/shared/queueitemcontentleaf.md)] | :heavy_check_mark: | Values in the object. Can be mixed content types. | \ No newline at end of file diff --git a/docs/models/components/queueitemsignals.md b/docs/models/components/queueitemsignals.md new file mode 100644 index 00000000..190fc818 --- /dev/null +++ b/docs/models/components/queueitemsignals.md @@ -0,0 +1,16 @@ +# QueueItemSignals + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `brand_impersonation` | [T.nilable(Models::Components::QueueItemBrandImpersonation)](../../models/shared/queueitembrandimpersonation.md) | :heavy_check_mark: | N/A | +| `has_suspicious_characters` | *T::Boolean* | :heavy_check_mark: | N/A | +| `is_link_shortener` | *T::Boolean* | :heavy_check_mark: | N/A | +| `domain_age_days` | *T.nilable(::Float)* | :heavy_check_mark: | N/A | +| `has_email_setup` | *T.nilable(T::Boolean)* | :heavy_check_mark: | N/A | +| `redirect_count` | *T.nilable(::Float)* | :heavy_check_mark: | N/A | +| `final_url` | *T.nilable(::String)* | :heavy_check_mark: | N/A | +| `bot_protection` | *T.nilable(T::Boolean)* | :heavy_check_mark: | N/A | +| `is_reported` | *T::Boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listqueueitemsstatus.md b/docs/models/components/queueitemstatus.md similarity index 62% rename from docs/models/operations/listqueueitemsstatus.md rename to docs/models/components/queueitemstatus.md index 911e0f41..ead5115d 100644 --- a/docs/models/operations/listqueueitemsstatus.md +++ b/docs/models/components/queueitemstatus.md @@ -1,16 +1,16 @@ -# ListQueueItemsStatus +# QueueItemStatus -Status of the item +`pending` waits for review. `resolved` is reviewed. ## Example Usage ```ruby require "moderation_api" -value = ListQueueItemsStatus::PENDING +value = QueueItemStatus::PENDING # Open enum: use .deserialize() to create instances from custom string values -custom = ListQueueItemsStatus.deserialize("custom_value") +custom = QueueItemStatus.deserialize("custom_value") ``` diff --git a/docs/models/components/queueitemtext.md b/docs/models/components/queueitemtext.md new file mode 100644 index 00000000..7dcfce46 --- /dev/null +++ b/docs/models/components/queueitemtext.md @@ -0,0 +1,11 @@ +# QueueItemText + +Text + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `text` | *::String* | :heavy_check_mark: | The content text | \ No newline at end of file diff --git a/docs/models/components/queueitemvideo.md b/docs/models/components/queueitemvideo.md new file mode 100644 index 00000000..be307080 --- /dev/null +++ b/docs/models/components/queueitemvideo.md @@ -0,0 +1,11 @@ +# QueueItemVideo + +Video + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `type` | *::String* | :heavy_check_mark: | N/A | +| `url` | *::String* | :heavy_check_mark: | A public URL of the video content | \ No newline at end of file diff --git a/docs/models/components/queuewithcounts.md b/docs/models/components/queuewithcounts.md new file mode 100644 index 00000000..dc480e20 --- /dev/null +++ b/docs/models/components/queuewithcounts.md @@ -0,0 +1,14 @@ +# QueueWithCounts + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `name` | *::String* | :heavy_check_mark: | The queue name. | +| `description` | *T.nilable(::String)* | :heavy_check_mark: | The queue description. | +| `is_default` | *T::Boolean* | :heavy_check_mark: | Whether this is the default queue of the project. | +| `unresolved_items_count` | *::Integer* | :heavy_check_mark: | Number of items that wait for review. | +| `resolved_items_count` | *::Integer* | :heavy_check_mark: | Number of items that are resolved. | +| `total_items_count` | *::Integer* | :heavy_check_mark: | Number of items in the queue, resolved and unresolved. | \ No newline at end of file diff --git a/docs/models/errors/badrequesterror.md b/docs/models/errors/badrequesterror.md index 7c4d632c..f0f8642b 100644 --- a/docs/models/errors/badrequesterror.md +++ b/docs/models/errors/badrequesterror.md @@ -5,12 +5,12 @@ The request is malformed or a parameter is invalid. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *::String* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | -| `code` | [Models::Components::BadRequestErrorCode](../../models/shared/badrequesterrorcode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

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

- `invalid_request`: A parameter is invalid. `message` says which one.
- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the 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` | *::String* | :heavy_check_mark: | Human-readable explanation. | Invalid input data | +| `issues` | T::Array<[Models::Components::ErrorIssue](../../models/shared/errorissue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | +| `request_id` | *::String* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | +| `doc_url` | *::String* | :heavy_check_mark: | Documentation for this `code`. | | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/models/errors/notfounderror.md b/docs/models/errors/notfounderror.md index dc9b53fc..9617eace 100644 --- a/docs/models/errors/notfounderror.md +++ b/docs/models/errors/notfounderror.md @@ -5,12 +5,12 @@ The resource does not exist or the key cannot see it. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *::String* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | -| `code` | [Models::Components::NotFoundErrorCode](../../models/shared/notfounderrorcode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

- `resource_not_found`: The resource does not exist.
- `action_not_found`: The action does not exist.
- `author_not_found`: The author does not exist.
- `queue_not_found`: The review queue does not exist.
- `wordlist_not_found`: The wordlist does not exist.
- `webhook_not_found`: The webhook does not exist.
- `project_not_found`: The project does not exist.
- `channel_not_found`: The channel does not exist. | resource_not_found | -| `message` | *::String* | :heavy_check_mark: | Human-readable explanation. | Not found | -| `issues` | T::Array<[Models::Components::ErrorIssue](../../models/shared/errorissue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | -| `request_id` | *::String* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | -| `doc_url` | *::String* | :heavy_check_mark: | Documentation for this `code`. | | -| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *::String* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | +| `code` | [Models::Components::NotFoundErrorCode](../../models/shared/notfounderrorcode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

- `resource_not_found`: The resource does not exist.
- `action_not_found`: The action does not exist.
- `author_not_found`: The author does not exist.
- `queue_not_found`: The review queue does not exist.
- `queue_item_not_found`: The queue item does not exist in the project.
- `wordlist_not_found`: The wordlist does not exist.
- `webhook_not_found`: The webhook does not exist.
- `project_not_found`: The project does not exist.
- `channel_not_found`: The channel does not exist. | resource_not_found | +| `message` | *::String* | :heavy_check_mark: | Human-readable explanation. | Not found | +| `issues` | T::Array<[Models::Components::ErrorIssue](../../models/shared/errorissue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | +| `request_id` | *::String* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | +| `doc_url` | *::String* | :heavy_check_mark: | Documentation for this `code`. | | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/models/operations/submitcontentrecommendationaction.md b/docs/models/operations/actionresponse.md similarity index 66% rename from docs/models/operations/submitcontentrecommendationaction.md rename to docs/models/operations/actionresponse.md index e4060232..cccb3904 100644 --- a/docs/models/operations/submitcontentrecommendationaction.md +++ b/docs/models/operations/actionresponse.md @@ -1,4 +1,4 @@ -# SubmitContentRecommendationAction +# ActionResponse The action to take based on the recommendation @@ -7,10 +7,10 @@ The action to take based on the recommendation ```ruby require "moderation_api" -value = SubmitContentRecommendationAction::REVIEW +value = ActionResponse::REVIEW # Open enum: use .deserialize() to create instances from custom string values -custom = SubmitContentRecommendationAction.deserialize("custom_value") +custom = ActionResponse.deserialize("custom_value") ``` diff --git a/docs/models/operations/actionstat.md b/docs/models/operations/actionstat.md deleted file mode 100644 index 0a9b2906..00000000 --- a/docs/models/operations/actionstat.md +++ /dev/null @@ -1,11 +0,0 @@ -# ActionStat - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `action_id` | *::String* | :heavy_check_mark: | ID of the moderation action | -| `action_name` | *::String* | :heavy_check_mark: | Name of the moderation action | -| `count` | *::Float* | :heavy_check_mark: | Number of times this action was taken | -| `percentage_of_total` | *::Float* | :heavy_check_mark: | Percentage this action represents of all actions | \ No newline at end of file diff --git a/docs/models/operations/addwordlistwordsrequest.md b/docs/models/operations/addwordlistwordsrequest.md index bd54365e..0f46e502 100644 --- a/docs/models/operations/addwordlistwordsrequest.md +++ b/docs/models/operations/addwordlistwordsrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to add words to | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::AddWordlistWordsRequestBody](../../models/operations/addwordlistwordsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to add words to | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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::Operations::AddWordlistWordsRequestBody](../../models/operations/addwordlistwordsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/bucket.md b/docs/models/operations/bucket.md new file mode 100644 index 00000000..ebd0d029 --- /dev/null +++ b/docs/models/operations/bucket.md @@ -0,0 +1,22 @@ +# Bucket + +The size of each entry in `volumes`. + +## Example Usage + +```ruby +require "moderation_api" + +value = Bucket::HOUR + +# Open enum: use .deserialize() to create instances from custom string values +custom = Bucket.deserialize("custom_value") +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `HOUR` | hour | +| `DAY` | day | \ No newline at end of file diff --git a/docs/models/operations/casebookagreement.md b/docs/models/operations/casebookagreement.md deleted file mode 100644 index 896ac0fb..00000000 --- a/docs/models/operations/casebookagreement.md +++ /dev/null @@ -1,21 +0,0 @@ -# CasebookAgreement - -## Example Usage - -```ruby -require "moderation_api" - -value = CasebookAgreement::ALL - -# Open enum: use .deserialize() to create instances from custom string values -custom = CasebookAgreement.deserialize("custom_value") -``` - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `ALL` | ALL | -| `OVERRULED` | OVERRULED | -| `AGREED` | AGREED | \ No newline at end of file diff --git a/docs/models/operations/casebookanswer.md b/docs/models/operations/casebookanswer.md deleted file mode 100644 index 48446961..00000000 --- a/docs/models/operations/casebookanswer.md +++ /dev/null @@ -1,22 +0,0 @@ -# CasebookAnswer - -## Example Usage - -```ruby -require "moderation_api" - -value = CasebookAnswer::ALL - -# Open enum: use .deserialize() to create instances from custom string values -custom = CasebookAnswer.deserialize("custom_value") -``` - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `ALL` | ALL | -| `ALLOWED` | ALLOWED | -| `REJECTED` | REJECTED | -| `NO_ANSWER` | NO_ANSWER | \ No newline at end of file diff --git a/docs/models/operations/channel.md b/docs/models/operations/channel.md new file mode 100644 index 00000000..b13d8bb4 --- /dev/null +++ b/docs/models/operations/channel.md @@ -0,0 +1,12 @@ +# Channel + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The channel ID. | +| `name` | *::String* | :heavy_check_mark: | The channel name. | +| `requests` | *::Integer* | :heavy_check_mark: | Requests received in this channel. | +| `flagged` | *::Integer* | :heavy_check_mark: | Requests flagged in this channel. | +| `flag_rate` | *::Float* | :heavy_check_mark: | The share of requests in this channel that were flagged: flagged / requests. | \ No newline at end of file diff --git a/docs/models/operations/checkstatus.md b/docs/models/operations/checkstatus.md deleted file mode 100644 index a19a8a63..00000000 --- a/docs/models/operations/checkstatus.md +++ /dev/null @@ -1,21 +0,0 @@ -# CheckStatus - -## Example Usage - -```ruby -require "moderation_api" - -value = CheckStatus::ALL - -# Open enum: use .deserialize() to create instances from custom string values -custom = CheckStatus.deserialize("custom_value") -``` - - -## Values - -| Name | Value | -| ----------- | ----------- | -| `ALL` | all | -| `CHECKED` | checked | -| `UNCHECKED` | unchecked | \ No newline at end of file diff --git a/docs/models/operations/classifieroutput.md b/docs/models/operations/classifieroutput.md index e3c6bb93..872f925e 100644 --- a/docs/models/operations/classifieroutput.md +++ b/docs/models/operations/classifieroutput.md @@ -12,5 +12,5 @@ Classifier policy. | `probability` | *::Float* | :heavy_check_mark: | N/A | | `flagged` | *T::Boolean* | :heavy_check_mark: | N/A | | `flagged_fields` | T::Array<*::String*> | :heavy_minus_sign: | The keys of the flagged fields if submitting an object. | -| `labels` | T::Array<[Models::Operations::SubmitContentLabel](../../models/operations/submitcontentlabel.md)> | :heavy_minus_sign: | N/A | +| `labels` | T::Array<[Models::Operations::Label](../../models/operations/label.md)> | :heavy_minus_sign: | N/A | | `data` | T::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Optional structured data produced by the policy. For face detection: { count, faces: [{ confidence, gender, age }] }. | \ No newline at end of file diff --git a/docs/models/operations/createactionrequest.md b/docs/models/operations/createactionrequest.md index d0785f07..28faf420 100644 --- a/docs/models/operations/createactionrequest.md +++ b/docs/models/operations/createactionrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::CreateActionRequestBody](../../models/operations/createactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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::Operations::CreateActionRequestBody](../../models/operations/createactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createauthorrequest.md b/docs/models/operations/createauthorrequest.md index 668219cf..3ba8badf 100644 --- a/docs/models/operations/createauthorrequest.md +++ b/docs/models/operations/createauthorrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::CreateAuthorRequestBody](../../models/operations/createauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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::Operations::CreateAuthorRequestBody](../../models/operations/createauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createfeedbackrequest.md b/docs/models/operations/createfeedbackrequest.md new file mode 100644 index 00000000..15a6320b --- /dev/null +++ b/docs/models/operations/createfeedbackrequest.md @@ -0,0 +1,9 @@ +# CreateFeedbackRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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::Operations::CreateFeedbackRequestBody](../../models/operations/createfeedbackrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createfeedbackrequestbody.md b/docs/models/operations/createfeedbackrequestbody.md new file mode 100644 index 00000000..7f317708 --- /dev/null +++ b/docs/models/operations/createfeedbackrequestbody.md @@ -0,0 +1,11 @@ +# CreateFeedbackRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `title` | *::String* | :heavy_check_mark: | A short summary of the request. | +| `description` | *::String* | :heavy_check_mark: | What you tried to do, why, and what is missing or does not work. Plain text. Blank lines start new paragraphs. | +| `type` | [T.nilable(Models::Operations::CreateFeedbackType)](../../models/operations/createfeedbacktype.md) | :heavy_minus_sign: | The kind of feedback. | +| `source` | [T.nilable(Models::Operations::Source)](../../models/operations/source.md) | :heavy_minus_sign: | Where the feedback was written: MCP server, agent skill, CLI or API. | \ No newline at end of file diff --git a/docs/models/operations/createfeedbackresponse.md b/docs/models/operations/createfeedbackresponse.md new file mode 100644 index 00000000..5a5acc58 --- /dev/null +++ b/docs/models/operations/createfeedbackresponse.md @@ -0,0 +1,11 @@ +# CreateFeedbackResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::CreateFeedbackResponseBody)](../../models/operations/createfeedbackresponsebody.md) | :heavy_minus_sign: | Feedback received | \ No newline at end of file diff --git a/docs/models/operations/createfeedbackresponsebody.md b/docs/models/operations/createfeedbackresponsebody.md new file mode 100644 index 00000000..2563f7ae --- /dev/null +++ b/docs/models/operations/createfeedbackresponsebody.md @@ -0,0 +1,11 @@ +# CreateFeedbackResponseBody + +Feedback received + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the feedback. | +| `status` | *::String* | :heavy_check_mark: | The team received the feedback. | \ No newline at end of file diff --git a/docs/models/operations/createfeedbacktype.md b/docs/models/operations/createfeedbacktype.md new file mode 100644 index 00000000..499809b1 --- /dev/null +++ b/docs/models/operations/createfeedbacktype.md @@ -0,0 +1,20 @@ +# CreateFeedbackType + +The kind of feedback. + +## Example Usage + +```ruby +require "moderation_api" + +value = CreateFeedbackType::FEATURE_REQUEST +``` + + +## Values + +| Name | Value | +| ----------------- | ----------------- | +| `FEATURE_REQUEST` | feature_request | +| `BUG` | bug | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/operations/createprojectapikeyrequest.md b/docs/models/operations/createprojectapikeyrequest.md new file mode 100644 index 00000000..b11f7c7c --- /dev/null +++ b/docs/models/operations/createprojectapikeyrequest.md @@ -0,0 +1,9 @@ +# CreateProjectApiKeyRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the project. | +| `body` | [Models::Operations::CreateProjectApiKeyRequestBody](../../models/operations/createprojectapikeyrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createprojectapikeyrequestbody.md b/docs/models/operations/createprojectapikeyrequestbody.md new file mode 100644 index 00000000..54ed1a8b --- /dev/null +++ b/docs/models/operations/createprojectapikeyrequestbody.md @@ -0,0 +1,8 @@ +# CreateProjectApiKeyRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *T.nilable(::String)* | :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/operations/createprojectapikeyresponse.md b/docs/models/operations/createprojectapikeyresponse.md new file mode 100644 index 00000000..7e184100 --- /dev/null +++ b/docs/models/operations/createprojectapikeyresponse.md @@ -0,0 +1,11 @@ +# CreateProjectApiKeyResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `project_api_key` | [T.nilable(Models::Components::ProjectApiKey)](../../models/shared/projectapikey.md) | :heavy_minus_sign: | API key created successfully | \ No newline at end of file diff --git a/docs/models/operations/createwebhookrequest.md b/docs/models/operations/createwebhookrequest.md index 86bcf8e6..82fab33f 100644 --- a/docs/models/operations/createwebhookrequest.md +++ b/docs/models/operations/createwebhookrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::CreateWebhookRequestBody](../../models/operations/createwebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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::Operations::CreateWebhookRequestBody](../../models/operations/createwebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createwordlistrequest.md b/docs/models/operations/createwordlistrequest.md new file mode 100644 index 00000000..ec4b5bcf --- /dev/null +++ b/docs/models/operations/createwordlistrequest.md @@ -0,0 +1,9 @@ +# CreateWordlistRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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::Operations::CreateWordlistRequestBody](../../models/operations/createwordlistrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createwordlistrequestbody.md b/docs/models/operations/createwordlistrequestbody.md new file mode 100644 index 00000000..6d46cdb1 --- /dev/null +++ b/docs/models/operations/createwordlistrequestbody.md @@ -0,0 +1,11 @@ +# CreateWordlistRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `name` | *::String* | :heavy_check_mark: | Name of the wordlist | +| `key` | *T.nilable(::String)* | :heavy_minus_sign: | Key of the wordlist. Default: made from the name. If the key is already in use, a suffix is added. | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | Description of the wordlist | +| `words` | T::Array<*::String*> | :heavy_minus_sign: | Words to add to the wordlist. Words are converted to lowercase. Duplicate and empty words are ignored. Maximum 5000 words. | \ No newline at end of file diff --git a/docs/models/operations/createwordlistresponse.md b/docs/models/operations/createwordlistresponse.md new file mode 100644 index 00000000..c7a3f2c8 --- /dev/null +++ b/docs/models/operations/createwordlistresponse.md @@ -0,0 +1,11 @@ +# CreateWordlistResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::CreateWordlistResponseBody)](../../models/operations/createwordlistresponsebody.md) | :heavy_minus_sign: | Wordlist created successfully | \ No newline at end of file diff --git a/docs/models/operations/createwordlistresponsebody.md b/docs/models/operations/createwordlistresponsebody.md new file mode 100644 index 00000000..00502c8a --- /dev/null +++ b/docs/models/operations/createwordlistresponsebody.md @@ -0,0 +1,16 @@ +# CreateWordlistResponseBody + +Wordlist created successfully + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist | +| `name` | *T.nilable(::String)* | :heavy_check_mark: | N/A | +| `words` | T::Array<*::String*> | :heavy_check_mark: | Words in the wordlist | +| `created_at` | *::String* | :heavy_check_mark: | Creation date of the wordlist | +| `organization_id` | *::String* | :heavy_check_mark: | ID of the organization | +| `user_id` | *T.nilable(::String)* | :heavy_check_mark: | N/A | +| `strict` | *T::Boolean* | :heavy_check_mark: | Strict mode | \ No newline at end of file diff --git a/docs/models/operations/dailyreviewcount.md b/docs/models/operations/dailyreviewcount.md index 0c8d46bd..2ae061ba 100644 --- a/docs/models/operations/dailyreviewcount.md +++ b/docs/models/operations/dailyreviewcount.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `date` | *::String* | :heavy_check_mark: | Date in YYYY-MM-DD format | -| `count` | *::Float* | :heavy_check_mark: | Number of reviews on this date | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `date` | *::String* | :heavy_check_mark: | Date in YYYY-MM-DD format (UTC). | +| `count` | *::Integer* | :heavy_check_mark: | Number of items resolved. | \ No newline at end of file diff --git a/docs/models/operations/deleteactionrequest.md b/docs/models/operations/deleteactionrequest.md index cd36c32c..581cbea4 100644 --- a/docs/models/operations/deleteactionrequest.md +++ b/docs/models/operations/deleteactionrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to delete. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to delete. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/deleteauthorrequest.md b/docs/models/operations/deleteauthorrequest.md index 8024e1be..c2c62767 100644 --- a/docs/models/operations/deleteauthorrequest.md +++ b/docs/models/operations/deleteauthorrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/deletewebhookrequest.md b/docs/models/operations/deletewebhookrequest.md index 93fd669e..864cb03e 100644 --- a/docs/models/operations/deletewebhookrequest.md +++ b/docs/models/operations/deletewebhookrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to delete. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to delete. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/executeactionrequest.md b/docs/models/operations/executeactionrequest.md index 05327d01..c9728ea1 100644 --- a/docs/models/operations/executeactionrequest.md +++ b/docs/models/operations/executeactionrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::ExecuteActionRequestBody](../../models/operations/executeactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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::Operations::ExecuteActionRequestBody](../../models/operations/executeactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/filter.md b/docs/models/operations/filter.md deleted file mode 100644 index 2a4cae08..00000000 --- a/docs/models/operations/filter.md +++ /dev/null @@ -1,32 +0,0 @@ -# Filter - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `is_flagged` | [T.nilable(Models::Operations::IsFlagged)](../../models/operations/isflagged.md) | :heavy_minus_sign: | N/A | -| `casebook_answer` | [T.nilable(Models::Operations::CasebookAnswer)](../../models/operations/casebookanswer.md) | :heavy_minus_sign: | N/A | -| `casebook_agreement` | [T.nilable(Models::Operations::CasebookAgreement)](../../models/operations/casebookagreement.md) | :heavy_minus_sign: | N/A | -| `labels` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `filter_labels` | T::Array<[Models::Operations::FilterLabel](../../models/operations/filterlabel.md)> | :heavy_minus_sign: | N/A | -| `metadata_filters` | T::Array<[Models::Operations::MetadataFilter](../../models/operations/metadatafilter.md)> | :heavy_minus_sign: | N/A | -| `filtered_channel_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `filtered_action_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `languages` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `content_types` | T::Array<[Models::Operations::GetQueueContentType](../../models/operations/getqueuecontenttype.md)> | :heavy_minus_sign: | N/A | -| `media_types` | T::Array<[Models::Operations::MediaType](../../models/operations/mediatype.md)> | :heavy_minus_sign: | N/A | -| `author_trust_levels` | T::Array<*::Integer*> | :heavy_minus_sign: | N/A | -| `recommendation_actions` | T::Array<[Models::Operations::GetQueueRecommendationAction](../../models/operations/getqueuerecommendationaction.md)> | :heavy_minus_sign: | N/A | -| `min_severity` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `max_severity` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `after_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `before_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `within` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | -| `within_unit` | [T.nilable(Models::Operations::WithinUnit)](../../models/operations/withinunit.md) | :heavy_minus_sign: | N/A | -| `clear_date_window` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | -| `check_status` | [T.nilable(Models::Operations::CheckStatus)](../../models/operations/checkstatus.md) | :heavy_minus_sign: | N/A | -| `author_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `content_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `conversation_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `search` | T::Array<*::String*> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/filterlabel.md b/docs/models/operations/filterlabel.md deleted file mode 100644 index 73e8e03f..00000000 --- a/docs/models/operations/filterlabel.md +++ /dev/null @@ -1,11 +0,0 @@ -# FilterLabel - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `label` | *::String* | :heavy_check_mark: | N/A | -| `type` | [Models::Operations::GetQueueType](../../models/operations/getqueuetype.md) | :heavy_check_mark: | N/A | -| `min_threshold` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | -| `max_threshold` | *T.nilable(::Float)* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/flaggedcontenttrend.md b/docs/models/operations/flaggedcontenttrend.md deleted file mode 100644 index 52f24f3a..00000000 --- a/docs/models/operations/flaggedcontenttrend.md +++ /dev/null @@ -1,9 +0,0 @@ -# FlaggedContentTrend - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `label` | *::String* | :heavy_check_mark: | Content flag/label | -| `trend` | *::Float* | :heavy_check_mark: | Trend indicator (-1 to 1) showing if this type of flagged content is increasing or decreasing | \ No newline at end of file diff --git a/docs/models/operations/flagratespike.md b/docs/models/operations/flagratespike.md new file mode 100644 index 00000000..95b9fe02 --- /dev/null +++ b/docs/models/operations/flagratespike.md @@ -0,0 +1,12 @@ +# FlagRateSpike + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `multiple` | *::Float* | :heavy_check_mark: | How many times higher the recent flag rate is than the baseline, for example 2.4. | +| `recent_flag_rate` | *::Float* | :heavy_check_mark: | The flag rate in the last 2 days. | +| `baseline_flag_rate` | *::Float* | :heavy_check_mark: | The flag rate in the 30 days before that. | +| `recent_flagged` | *::Integer* | :heavy_check_mark: | Flagged requests in the last 2 days. | +| `recent_requests` | *::Integer* | :heavy_check_mark: | Requests in the last 2 days. | \ No newline at end of file diff --git a/docs/models/operations/getaccountrequest.md b/docs/models/operations/getaccountrequest.md index f4b1f2ce..91a3b5fe 100644 --- a/docs/models/operations/getaccountrequest.md +++ b/docs/models/operations/getaccountrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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/operations/getactionrequest.md b/docs/models/operations/getactionrequest.md index 7dfa98d5..9ca4f4fc 100644 --- a/docs/models/operations/getactionrequest.md +++ b/docs/models/operations/getactionrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to get. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to get. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/getanalyticsauthorsauthor.md b/docs/models/operations/getanalyticsauthorsauthor.md new file mode 100644 index 00000000..54e525a6 --- /dev/null +++ b/docs/models/operations/getanalyticsauthorsauthor.md @@ -0,0 +1,10 @@ +# GetAnalyticsAuthorsAuthor + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `author_id` | *::String* | :heavy_check_mark: | The author ID from your system. Use it with the authors endpoints. | +| `name` | *T.nilable(::String)* | :heavy_check_mark: | The author name, if known. | +| `flagged` | *::Integer* | :heavy_check_mark: | Flagged requests from this author in the window. | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsauthorsqueryparamrange.md b/docs/models/operations/getanalyticsauthorsqueryparamrange.md new file mode 100644 index 00000000..97d9e8ee --- /dev/null +++ b/docs/models/operations/getanalyticsauthorsqueryparamrange.md @@ -0,0 +1,21 @@ +# GetAnalyticsAuthorsQueryParamRange + +The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsAuthorsQueryParamRange::TWENTY_FOURH +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsauthorsrangeresponse.md b/docs/models/operations/getanalyticsauthorsrangeresponse.md new file mode 100644 index 00000000..ecf3cb89 --- /dev/null +++ b/docs/models/operations/getanalyticsauthorsrangeresponse.md @@ -0,0 +1,24 @@ +# GetAnalyticsAuthorsRangeResponse + +The time window of the numbers. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsAuthorsRangeResponse::TWENTY_FOURH + +# Open enum: use .deserialize() to create instances from custom string values +custom = GetAnalyticsAuthorsRangeResponse.deserialize("custom_value") +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsauthorsrequest.md b/docs/models/operations/getanalyticsauthorsrequest.md new file mode 100644 index 00000000..170fa2bc --- /dev/null +++ b/docs/models/operations/getanalyticsauthorsrequest.md @@ -0,0 +1,11 @@ +# GetAnalyticsAuthorsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsAuthorsQueryParamRange)](../../models/operations/getanalyticsauthorsqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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/operations/getanalyticsauthorsresponse.md b/docs/models/operations/getanalyticsauthorsresponse.md new file mode 100644 index 00000000..b2a2a4e6 --- /dev/null +++ b/docs/models/operations/getanalyticsauthorsresponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsAuthorsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::GetAnalyticsAuthorsResponseBody)](../../models/operations/getanalyticsauthorsresponsebody.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsauthorsresponsebody.md b/docs/models/operations/getanalyticsauthorsresponsebody.md new file mode 100644 index 00000000..85751a99 --- /dev/null +++ b/docs/models/operations/getanalyticsauthorsresponsebody.md @@ -0,0 +1,12 @@ +# GetAnalyticsAuthorsResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `range` | [Models::Operations::GetAnalyticsAuthorsRangeResponse](../../models/operations/getanalyticsauthorsrangeresponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channel_id` | *T.nilable(::String)* | :heavy_check_mark: | The channel the numbers are for. Null when they are for all channels. | +| `authors` | T::Array<[Models::Operations::GetAnalyticsAuthorsAuthor](../../models/operations/getanalyticsauthorsauthor.md)> | :heavy_check_mark: | The authors with the most flagged requests, largest first. Requests without an author are not included. | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsautomationqueryparamrange.md b/docs/models/operations/getanalyticsautomationqueryparamrange.md new file mode 100644 index 00000000..dd7511a0 --- /dev/null +++ b/docs/models/operations/getanalyticsautomationqueryparamrange.md @@ -0,0 +1,21 @@ +# GetAnalyticsAutomationQueryParamRange + +The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsAutomationQueryParamRange::TWENTY_FOURH +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsautomationrangeresponse.md b/docs/models/operations/getanalyticsautomationrangeresponse.md new file mode 100644 index 00000000..6344b31c --- /dev/null +++ b/docs/models/operations/getanalyticsautomationrangeresponse.md @@ -0,0 +1,24 @@ +# GetAnalyticsAutomationRangeResponse + +The time window of the numbers. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsAutomationRangeResponse::TWENTY_FOURH + +# Open enum: use .deserialize() to create instances from custom string values +custom = GetAnalyticsAutomationRangeResponse.deserialize("custom_value") +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsautomationrequest.md b/docs/models/operations/getanalyticsautomationrequest.md new file mode 100644 index 00000000..6c756083 --- /dev/null +++ b/docs/models/operations/getanalyticsautomationrequest.md @@ -0,0 +1,10 @@ +# GetAnalyticsAutomationRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsAutomationQueryParamRange)](../../models/operations/getanalyticsautomationqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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/operations/getanalyticsautomationresponse.md b/docs/models/operations/getanalyticsautomationresponse.md new file mode 100644 index 00000000..7727ab7f --- /dev/null +++ b/docs/models/operations/getanalyticsautomationresponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsAutomationResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::GetAnalyticsAutomationResponseBody)](../../models/operations/getanalyticsautomationresponsebody.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsautomationresponsebody.md b/docs/models/operations/getanalyticsautomationresponsebody.md new file mode 100644 index 00000000..f9b9b411 --- /dev/null +++ b/docs/models/operations/getanalyticsautomationresponsebody.md @@ -0,0 +1,23 @@ +# GetAnalyticsAutomationResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [Models::Operations::GetAnalyticsAutomationRangeResponse](../../models/operations/getanalyticsautomationrangeresponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channel_id` | *T.nilable(::String)* | :heavy_check_mark: | The channel the numbers are for. Null when they are for all channels. | +| `flagged` | *::Integer* | :heavy_check_mark: | Flagged requests in the window. Counted on a rolling window from the raw requests, so it can be a little different from the summary. | +| `handled_by_rules` | *::Integer* | :heavy_check_mark: | Flagged requests that a rule allowed or rejected without human review. | +| `handled_by_casebook` | *::Integer* | :heavy_check_mark: | Flagged requests that the casebook settled without human review. | +| `sent_to_review` | *::Integer* | :heavy_check_mark: | Distinct content items sent to the review queue. Repeats of the same content count once, as in the queue. | +| `merged_duplicates` | *::Integer* | :heavy_check_mark: | Flagged requests that the review queue merged into an item it already shows: repeats, edits and content that was settled later. | +| `automation_rate` | *T.nilable(::Float)* | :heavy_check_mark: | N/A | +| `reviews_allowed` | *::Integer* | :heavy_check_mark: | Review queue items from this window that a moderator allowed. | +| `reviews_rejected` | *::Integer* | :heavy_check_mark: | Review queue items from this window that a moderator rejected. | +| `reviews_resolved_without_decision` | *::Integer* | :heavy_check_mark: | Review queue items from this window that a moderator marked as done without allow or reject. | +| `reviews_unresolved` | *::Integer* | :heavy_check_mark: | Review queue items from this window that are still open. | +| `casebook_overrulings` | *::Integer* | :heavy_check_mark: | Requests where the casebook decision was different from the decision based on severity. | +| `rules` | T::Array<[Models::Operations::Rule](../../models/operations/rule.md)> | :heavy_check_mark: | The rules that settled flagged requests without review, largest first. The 5 largest have their own entry. The casebook is one of the rules. | \ No newline at end of file diff --git a/docs/models/operations/getanalyticschannelsqueryparamrange.md b/docs/models/operations/getanalyticschannelsqueryparamrange.md new file mode 100644 index 00000000..a8ba6845 --- /dev/null +++ b/docs/models/operations/getanalyticschannelsqueryparamrange.md @@ -0,0 +1,21 @@ +# GetAnalyticsChannelsQueryParamRange + +The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsChannelsQueryParamRange::TWENTY_FOURH +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticschannelsrangeresponse.md b/docs/models/operations/getanalyticschannelsrangeresponse.md new file mode 100644 index 00000000..37b10c3b --- /dev/null +++ b/docs/models/operations/getanalyticschannelsrangeresponse.md @@ -0,0 +1,24 @@ +# GetAnalyticsChannelsRangeResponse + +The time window of the numbers. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsChannelsRangeResponse::TWENTY_FOURH + +# Open enum: use .deserialize() to create instances from custom string values +custom = GetAnalyticsChannelsRangeResponse.deserialize("custom_value") +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticschannelsrequest.md b/docs/models/operations/getanalyticschannelsrequest.md new file mode 100644 index 00000000..46b36e02 --- /dev/null +++ b/docs/models/operations/getanalyticschannelsrequest.md @@ -0,0 +1,9 @@ +# GetAnalyticsChannelsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsChannelsQueryParamRange)](../../models/operations/getanalyticschannelsqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `project_id` | *T.nilable(::String)* | :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/operations/getanalyticschannelsresponse.md b/docs/models/operations/getanalyticschannelsresponse.md new file mode 100644 index 00000000..341a9273 --- /dev/null +++ b/docs/models/operations/getanalyticschannelsresponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsChannelsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::GetAnalyticsChannelsResponseBody)](../../models/operations/getanalyticschannelsresponsebody.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/docs/models/operations/getanalyticschannelsresponsebody.md b/docs/models/operations/getanalyticschannelsresponsebody.md new file mode 100644 index 00000000..981d5450 --- /dev/null +++ b/docs/models/operations/getanalyticschannelsresponsebody.md @@ -0,0 +1,11 @@ +# GetAnalyticsChannelsResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `range` | [Models::Operations::GetAnalyticsChannelsRangeResponse](../../models/operations/getanalyticschannelsrangeresponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channels` | T::Array<[Models::Operations::Channel](../../models/operations/channel.md)> | :heavy_check_mark: | Requests and flags per channel. Channels with no requests in the window are not included. | \ No newline at end of file diff --git a/docs/models/operations/getanalyticspoliciespolicy.md b/docs/models/operations/getanalyticspoliciespolicy.md new file mode 100644 index 00000000..d7f2ae26 --- /dev/null +++ b/docs/models/operations/getanalyticspoliciespolicy.md @@ -0,0 +1,10 @@ +# GetAnalyticsPoliciesPolicy + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `label` | *::String* | :heavy_check_mark: | The policy label, for example `toxicity`. | +| `flagged` | *::Integer* | :heavy_check_mark: | Flagged requests with this label in the window. Repeats count each time. | +| `previous_flagged` | *::Integer* | :heavy_check_mark: | Flagged requests with this label in the window of equal length before. | \ No newline at end of file diff --git a/docs/models/operations/getanalyticspoliciesqueryparamrange.md b/docs/models/operations/getanalyticspoliciesqueryparamrange.md new file mode 100644 index 00000000..23e8445e --- /dev/null +++ b/docs/models/operations/getanalyticspoliciesqueryparamrange.md @@ -0,0 +1,21 @@ +# GetAnalyticsPoliciesQueryParamRange + +The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsPoliciesQueryParamRange::TWENTY_FOURH +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticspoliciesrangeresponse.md b/docs/models/operations/getanalyticspoliciesrangeresponse.md new file mode 100644 index 00000000..af4490ba --- /dev/null +++ b/docs/models/operations/getanalyticspoliciesrangeresponse.md @@ -0,0 +1,24 @@ +# GetAnalyticsPoliciesRangeResponse + +The time window of the numbers. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsPoliciesRangeResponse::TWENTY_FOURH + +# Open enum: use .deserialize() to create instances from custom string values +custom = GetAnalyticsPoliciesRangeResponse.deserialize("custom_value") +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticspoliciesrequest.md b/docs/models/operations/getanalyticspoliciesrequest.md new file mode 100644 index 00000000..0b040863 --- /dev/null +++ b/docs/models/operations/getanalyticspoliciesrequest.md @@ -0,0 +1,11 @@ +# GetAnalyticsPoliciesRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsPoliciesQueryParamRange)](../../models/operations/getanalyticspoliciesqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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/operations/getanalyticspoliciesresponse.md b/docs/models/operations/getanalyticspoliciesresponse.md new file mode 100644 index 00000000..20e04584 --- /dev/null +++ b/docs/models/operations/getanalyticspoliciesresponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsPoliciesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::GetAnalyticsPoliciesResponseBody)](../../models/operations/getanalyticspoliciesresponsebody.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/docs/models/operations/getanalyticspoliciesresponsebody.md b/docs/models/operations/getanalyticspoliciesresponsebody.md new file mode 100644 index 00000000..87914163 --- /dev/null +++ b/docs/models/operations/getanalyticspoliciesresponsebody.md @@ -0,0 +1,12 @@ +# GetAnalyticsPoliciesResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `range` | [Models::Operations::GetAnalyticsPoliciesRangeResponse](../../models/operations/getanalyticspoliciesrangeresponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channel_id` | *T.nilable(::String)* | :heavy_check_mark: | The channel the numbers are for. Null when they are for all channels. | +| `policies` | T::Array<[Models::Operations::GetAnalyticsPoliciesPolicy](../../models/operations/getanalyticspoliciespolicy.md)> | :heavy_check_mark: | The policy labels with the most flagged requests, largest first. | \ No newline at end of file diff --git a/docs/models/operations/getanalyticssummaryqueryparamrange.md b/docs/models/operations/getanalyticssummaryqueryparamrange.md new file mode 100644 index 00000000..76ab95ee --- /dev/null +++ b/docs/models/operations/getanalyticssummaryqueryparamrange.md @@ -0,0 +1,21 @@ +# GetAnalyticsSummaryQueryParamRange + +The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsSummaryQueryParamRange::TWENTY_FOURH +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticssummaryrangeresponse.md b/docs/models/operations/getanalyticssummaryrangeresponse.md new file mode 100644 index 00000000..9483798a --- /dev/null +++ b/docs/models/operations/getanalyticssummaryrangeresponse.md @@ -0,0 +1,24 @@ +# GetAnalyticsSummaryRangeResponse + +The time window of the numbers. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsSummaryRangeResponse::TWENTY_FOURH + +# Open enum: use .deserialize() to create instances from custom string values +custom = GetAnalyticsSummaryRangeResponse.deserialize("custom_value") +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticssummaryrequest.md b/docs/models/operations/getanalyticssummaryrequest.md new file mode 100644 index 00000000..12f62e1d --- /dev/null +++ b/docs/models/operations/getanalyticssummaryrequest.md @@ -0,0 +1,10 @@ +# GetAnalyticsSummaryRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsSummaryQueryParamRange)](../../models/operations/getanalyticssummaryqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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/operations/getanalyticssummaryresponse.md b/docs/models/operations/getanalyticssummaryresponse.md new file mode 100644 index 00000000..d572a44e --- /dev/null +++ b/docs/models/operations/getanalyticssummaryresponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsSummaryResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::GetAnalyticsSummaryResponseBody)](../../models/operations/getanalyticssummaryresponsebody.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/docs/models/operations/getanalyticssummaryresponsebody.md b/docs/models/operations/getanalyticssummaryresponsebody.md new file mode 100644 index 00000000..f9f779cf --- /dev/null +++ b/docs/models/operations/getanalyticssummaryresponsebody.md @@ -0,0 +1,15 @@ +# GetAnalyticsSummaryResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [Models::Operations::GetAnalyticsSummaryRangeResponse](../../models/operations/getanalyticssummaryrangeresponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channel_id` | *T.nilable(::String)* | :heavy_check_mark: | The channel the numbers are for. Null when they are for all channels. | +| `totals` | [Models::Operations::Totals](../../models/operations/totals.md) | :heavy_check_mark: | Request counts for the window. A flagged request has one recommendation: allow, reject or review. | +| `previous_period` | [Models::Operations::PreviousPeriod](../../models/operations/previousperiod.md) | :heavy_check_mark: | The same counts for the window of equal length just before this one. Compare with `totals` to see the trend. | +| `pending_review` | *::Integer* | :heavy_check_mark: | Items in the default review queue that nobody has reviewed yet, counted as the queue counts them (repeats count once). The queue looks back 30 days, so older items are not included. The range does not change it. | +| `flag_rate_spike` | [T.nilable(Models::Operations::FlagRateSpike)](../../models/operations/flagratespike.md) | :heavy_check_mark: | Set when the flag rate of the last 2 days is at least 2 times the rate of the 30 days before, with at least 50 flagged requests. Null when there is no spike. Always for the full project: the range and channel do not change it. | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsvolumesqueryparamrange.md b/docs/models/operations/getanalyticsvolumesqueryparamrange.md new file mode 100644 index 00000000..49d9f873 --- /dev/null +++ b/docs/models/operations/getanalyticsvolumesqueryparamrange.md @@ -0,0 +1,21 @@ +# GetAnalyticsVolumesQueryParamRange + +The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsVolumesQueryParamRange::TWENTY_FOURH +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsvolumesrangeresponse.md b/docs/models/operations/getanalyticsvolumesrangeresponse.md new file mode 100644 index 00000000..60501e9c --- /dev/null +++ b/docs/models/operations/getanalyticsvolumesrangeresponse.md @@ -0,0 +1,24 @@ +# GetAnalyticsVolumesRangeResponse + +The time window of the numbers. + +## Example Usage + +```ruby +require "moderation_api" + +value = GetAnalyticsVolumesRangeResponse::TWENTY_FOURH + +# Open enum: use .deserialize() to create instances from custom string values +custom = GetAnalyticsVolumesRangeResponse.deserialize("custom_value") +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `TWENTY_FOURH` | 24h | +| `SEVEND` | 7d | +| `THIRTYD` | 30d | +| `NINETYD` | 90d | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsvolumesrequest.md b/docs/models/operations/getanalyticsvolumesrequest.md new file mode 100644 index 00000000..47270f71 --- /dev/null +++ b/docs/models/operations/getanalyticsvolumesrequest.md @@ -0,0 +1,10 @@ +# GetAnalyticsVolumesRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsVolumesQueryParamRange)](../../models/operations/getanalyticsvolumesqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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/operations/getanalyticsvolumesresponse.md b/docs/models/operations/getanalyticsvolumesresponse.md new file mode 100644 index 00000000..08dc6620 --- /dev/null +++ b/docs/models/operations/getanalyticsvolumesresponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsVolumesResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::GetAnalyticsVolumesResponseBody)](../../models/operations/getanalyticsvolumesresponsebody.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/docs/models/operations/getanalyticsvolumesresponsebody.md b/docs/models/operations/getanalyticsvolumesresponsebody.md new file mode 100644 index 00000000..0f7f9385 --- /dev/null +++ b/docs/models/operations/getanalyticsvolumesresponsebody.md @@ -0,0 +1,13 @@ +# GetAnalyticsVolumesResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `range` | [Models::Operations::GetAnalyticsVolumesRangeResponse](../../models/operations/getanalyticsvolumesrangeresponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channel_id` | *T.nilable(::String)* | :heavy_check_mark: | The channel the numbers are for. Null when they are for all channels. | +| `bucket` | [Models::Operations::Bucket](../../models/operations/bucket.md) | :heavy_check_mark: | The size of each entry in `volumes`. | +| `volumes` | T::Array<[Models::Operations::Volume](../../models/operations/volume.md)> | :heavy_check_mark: | Counts over time, oldest first. Buckets with no requests are included with zeros. | \ No newline at end of file diff --git a/docs/models/operations/getauthorrequest.md b/docs/models/operations/getauthorrequest.md index b2cce0d5..45fb24f2 100644 --- a/docs/models/operations/getauthorrequest.md +++ b/docs/models/operations/getauthorrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/getqueuecontenttype.md b/docs/models/operations/getqueuecontenttype.md deleted file mode 100644 index d0d87005..00000000 --- a/docs/models/operations/getqueuecontenttype.md +++ /dev/null @@ -1,27 +0,0 @@ -# GetQueueContentType - -## Example Usage - -```ruby -require "moderation_api" - -value = GetQueueContentType::PROFILE - -# Open enum: use .deserialize() to create instances from custom string values -custom = GetQueueContentType.deserialize("custom_value") -``` - - -## Values - -| Name | Value | -| --------- | --------- | -| `PROFILE` | profile | -| `MESSAGE` | message | -| `POST` | post | -| `COMMENT` | comment | -| `EVENT` | event | -| `PRODUCT` | product | -| `REVIEW` | review | -| `VOICE` | voice | -| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/operations/getqueuerecommendationaction.md b/docs/models/operations/getqueuerecommendationaction.md deleted file mode 100644 index 3b8605d4..00000000 --- a/docs/models/operations/getqueuerecommendationaction.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetQueueRecommendationAction - -## Example Usage - -```ruby -require "moderation_api" - -value = GetQueueRecommendationAction::REVIEW - -# Open enum: use .deserialize() to create instances from custom string values -custom = GetQueueRecommendationAction.deserialize("custom_value") -``` - - -## Values - -| Name | Value | -| -------- | -------- | -| `REVIEW` | review | -| `ALLOW` | allow | -| `REJECT` | reject | \ No newline at end of file diff --git a/docs/models/operations/getqueuerequest.md b/docs/models/operations/getqueuerequest.md index 884a218e..fb6d192e 100644 --- a/docs/models/operations/getqueuerequest.md +++ b/docs/models/operations/getqueuerequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/getqueueresponsebody.md b/docs/models/operations/getqueueresponsebody.md index e8686fdb..002f6289 100644 --- a/docs/models/operations/getqueueresponsebody.md +++ b/docs/models/operations/getqueueresponsebody.md @@ -5,6 +5,6 @@ Successful response ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `queue` | [Models::Operations::Queue](../../models/operations/queue.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `queue` | [Models::Components::QueueWithCounts](../../models/shared/queuewithcounts.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getqueuestatsrequest.md b/docs/models/operations/getqueuestatsrequest.md index a58dff4b..e6c00c86 100644 --- a/docs/models/operations/getqueuestatsrequest.md +++ b/docs/models/operations/getqueuestatsrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `within_days` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `within_days` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/getqueuestatsresponsebody.md b/docs/models/operations/getqueuestatsresponsebody.md index f3cd8ce1..786a7bf1 100644 --- a/docs/models/operations/getqueuestatsresponsebody.md +++ b/docs/models/operations/getqueuestatsresponsebody.md @@ -8,6 +8,5 @@ Successful response | Field | Type | Required | Description | | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | `review_stats` | [Models::Operations::ReviewStats](../../models/operations/reviewstats.md) | :heavy_check_mark: | N/A | -| `action_stats` | T::Array<[Models::Operations::ActionStat](../../models/operations/actionstat.md)> | :heavy_check_mark: | N/A | -| `top_reviewers` | T::Array<[Models::Operations::TopReviewer](../../models/operations/topreviewer.md)> | :heavy_check_mark: | List of top reviewers and their statistics | +| `top_reviewers` | T::Array<[Models::Operations::TopReviewer](../../models/operations/topreviewer.md)> | :heavy_check_mark: | Reviewers with the most resolved items, most first. Up to 10. | | `trends` | [Models::Operations::Trends](../../models/operations/trends.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getqueuetype.md b/docs/models/operations/getqueuetype.md deleted file mode 100644 index bcb720f0..00000000 --- a/docs/models/operations/getqueuetype.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetQueueType - -## Example Usage - -```ruby -require "moderation_api" - -value = GetQueueType::FLAGGED - -# Open enum: use .deserialize() to create instances from custom string values -custom = GetQueueType.deserialize("custom_value") -``` - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `FLAGGED` | FLAGGED | -| `NOT_FLAGGED` | NOT_FLAGGED | -| `THRESHOLDS` | THRESHOLDS | -| `MATCHED` | MATCHED | \ No newline at end of file diff --git a/docs/models/operations/getwebhookrequest.md b/docs/models/operations/getwebhookrequest.md index 198cae65..5adc17a9 100644 --- a/docs/models/operations/getwebhookrequest.md +++ b/docs/models/operations/getwebhookrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to get. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to get. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/getwebhooksecretrequest.md b/docs/models/operations/getwebhooksecretrequest.md index b226b3fb..782ecf46 100644 --- a/docs/models/operations/getwebhooksecretrequest.md +++ b/docs/models/operations/getwebhooksecretrequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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/operations/getwordlistembeddingstatusrequest.md b/docs/models/operations/getwordlistembeddingstatusrequest.md index d2a7c907..58b83cdd 100644 --- a/docs/models/operations/getwordlistembeddingstatusrequest.md +++ b/docs/models/operations/getwordlistembeddingstatusrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to check embedding status for | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/getwordlistrequest.md b/docs/models/operations/getwordlistrequest.md index 40b159dd..fbaac50b 100644 --- a/docs/models/operations/getwordlistrequest.md +++ b/docs/models/operations/getwordlistrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to get | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to get | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/isflagged.md b/docs/models/operations/isflagged.md deleted file mode 100644 index 415bc200..00000000 --- a/docs/models/operations/isflagged.md +++ /dev/null @@ -1,22 +0,0 @@ -# IsFlagged - -## Example Usage - -```ruby -require "moderation_api" - -value = IsFlagged::ALL - -# Open enum: use .deserialize() to create instances from custom string values -custom = IsFlagged.deserialize("custom_value") -``` - - -## Values - -| Name | Value | -| ---------------- | ---------------- | -| `ALL` | ALL | -| `FLAGGED` | FLAGGED | -| `NOT_FLAGGED` | NOT_FLAGGED | -| `SHADOW_FLAGGED` | SHADOW_FLAGGED | \ No newline at end of file diff --git a/docs/models/operations/submitcontentlabel.md b/docs/models/operations/label.md similarity index 96% rename from docs/models/operations/submitcontentlabel.md rename to docs/models/operations/label.md index ef876b3e..cc2231ad 100644 --- a/docs/models/operations/submitcontentlabel.md +++ b/docs/models/operations/label.md @@ -1,4 +1,4 @@ -# SubmitContentLabel +# Label ## Fields diff --git a/docs/models/operations/listactionsrequest.md b/docs/models/operations/listactionsrequest.md index 9c1c1d50..1cf19804 100644 --- a/docs/models/operations/listactionsrequest.md +++ b/docs/models/operations/listactionsrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `queue_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queue_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/listauthorsrequest.md b/docs/models/operations/listauthorsrequest.md index e2a6d580..fc8be4e8 100644 --- a/docs/models/operations/listauthorsrequest.md +++ b/docs/models/operations/listauthorsrequest.md @@ -3,13 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `sort_by` | [T.nilable(Models::Operations::SortBy)](../../models/operations/sortby.md) | :heavy_minus_sign: | N/A | -| `sort_direction` | [T.nilable(Models::Operations::ListAuthorsSortDirection)](../../models/operations/listauthorssortdirection.md) | :heavy_minus_sign: | Sort direction | -| `member_since_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `last_active_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `content_types` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `sort_by` | [T.nilable(Models::Operations::SortBy)](../../models/operations/sortby.md) | :heavy_minus_sign: | N/A | +| `sort_direction` | [T.nilable(Models::Operations::SortDirection)](../../models/operations/sortdirection.md) | :heavy_minus_sign: | Sort direction | +| `member_since_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `last_active_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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/operations/listqueueitemsaction.md b/docs/models/operations/listqueueitemsaction.md deleted file mode 100644 index 65954cbc..00000000 --- a/docs/models/operations/listqueueitemsaction.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListQueueItemsAction - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Action ID | -| `name` | *::String* | :heavy_check_mark: | Action name | -| `comment` | *T.nilable(::String)* | :heavy_minus_sign: | Action comment | -| `timestamp` | *::Float* | :heavy_check_mark: | Unix timestamp of when the action was taken | -| `reviewer` | *T.nilable(::String)* | :heavy_minus_sign: | Moderator userID | \ No newline at end of file diff --git a/docs/models/operations/listqueueitemsdata.md b/docs/models/operations/listqueueitemsdata.md deleted file mode 100644 index 8d1140d5..00000000 --- a/docs/models/operations/listqueueitemsdata.md +++ /dev/null @@ -1,18 +0,0 @@ -# ListQueueItemsData - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Content ID | -| `content` | *::String* | :heavy_check_mark: | The content to be moderated | -| `language` | *T.nilable(::String)* | :heavy_minus_sign: | Content language | -| `labels` | T::Array<[Models::Operations::ListQueueItemsLabel](../../models/operations/listqueueitemslabel.md)> | :heavy_check_mark: | N/A | -| `conversation_id` | *T.nilable(::String)* | :heavy_minus_sign: | Conversation ID | -| `author_id` | *T.nilable(::String)* | :heavy_minus_sign: | Author ID | -| `actions` | T::Array<[Models::Operations::ListQueueItemsAction](../../models/operations/listqueueitemsaction.md)> | :heavy_minus_sign: | Action IDs taken on this item | -| `flagged` | *T::Boolean* | :heavy_check_mark: | Whether the item is flagged by any label | -| `status` | [Models::Operations::ListQueueItemsStatus](../../models/operations/listqueueitemsstatus.md) | :heavy_check_mark: | Status of the item | -| `timestamp` | *::Float* | :heavy_check_mark: | Unix timestamp of when the item was created | -| `content_type` | *T.nilable(::String)* | :heavy_minus_sign: | Type of the content object | \ No newline at end of file diff --git a/docs/models/operations/listqueueitemslabel.md b/docs/models/operations/listqueueitemslabel.md deleted file mode 100644 index 4d72baee..00000000 --- a/docs/models/operations/listqueueitemslabel.md +++ /dev/null @@ -1,10 +0,0 @@ -# ListQueueItemsLabel - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `label` | *::String* | :heavy_check_mark: | Label name | -| `score` | *::Float* | :heavy_check_mark: | Confidence score of the label | -| `flagged` | *T::Boolean* | :heavy_check_mark: | Whether this label caused a flag | \ No newline at end of file diff --git a/docs/models/operations/listqueueitemsrequest.md b/docs/models/operations/listqueueitemsrequest.md index f4e1413b..e1b2cf13 100644 --- a/docs/models/operations/listqueueitemsrequest.md +++ b/docs/models/operations/listqueueitemsrequest.md @@ -3,18 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `sort_field` | [T.nilable(Models::Operations::SortField)](../../models/operations/sortfield.md) | :heavy_minus_sign: | N/A | -| `sort_direction` | [T.nilable(Models::Operations::ListQueueItemsSortDirection)](../../models/operations/listqueueitemssortdirection.md) | :heavy_minus_sign: | Sort direction | -| `conversation_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `labels` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `after_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `before_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `include_resolved` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | -| `author_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `filtered_action_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `sort` | [T.nilable(Models::Operations::Sort)](../../models/operations/sort.md) | :heavy_minus_sign: | N/A | +| `include_resolved` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A | +| `conversation_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `labels` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `author_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `filtered_action_ids` | T::Array<*::String*> | :heavy_minus_sign: | N/A | +| `after_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `before_date` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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/operations/listqueueitemsresponsebody.md b/docs/models/operations/listqueueitemsresponsebody.md index d475a79f..245bef72 100644 --- a/docs/models/operations/listqueueitemsresponsebody.md +++ b/docs/models/operations/listqueueitemsresponsebody.md @@ -5,7 +5,7 @@ Successful response ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `data` | T::Array<[Models::Operations::ListQueueItemsData](../../models/operations/listqueueitemsdata.md)> | :heavy_check_mark: | The items on this page. | -| `pagination` | [Models::Components::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | Where this page is in the full list. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `data` | T::Array<[Models::Components::QueueItem](../../models/shared/queueitem.md)> | :heavy_check_mark: | The items on this page. | +| `pagination` | [Models::Components::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | Where this page is in the full list. | \ No newline at end of file diff --git a/docs/models/operations/listqueueitemssortdirection.md b/docs/models/operations/listqueueitemssortdirection.md deleted file mode 100644 index a77aeec9..00000000 --- a/docs/models/operations/listqueueitemssortdirection.md +++ /dev/null @@ -1,19 +0,0 @@ -# ListQueueItemsSortDirection - -Sort direction - -## Example Usage - -```ruby -require "moderation_api" - -value = ListQueueItemsSortDirection::ASC -``` - - -## Values - -| Name | Value | -| ------ | ------ | -| `ASC` | asc | -| `DESC` | desc | \ No newline at end of file diff --git a/docs/models/operations/listqueuesrequest.md b/docs/models/operations/listqueuesrequest.md new file mode 100644 index 00000000..14d0b2c7 --- /dev/null +++ b/docs/models/operations/listqueuesrequest.md @@ -0,0 +1,10 @@ +# ListQueuesRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/listqueuesresponse.md b/docs/models/operations/listqueuesresponse.md new file mode 100644 index 00000000..a376590d --- /dev/null +++ b/docs/models/operations/listqueuesresponse.md @@ -0,0 +1,11 @@ +# ListQueuesResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::ListQueuesResponseBody)](../../models/operations/listqueuesresponsebody.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/docs/models/operations/listqueuesresponsebody.md b/docs/models/operations/listqueuesresponsebody.md new file mode 100644 index 00000000..84776f20 --- /dev/null +++ b/docs/models/operations/listqueuesresponsebody.md @@ -0,0 +1,11 @@ +# ListQueuesResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `data` | T::Array<[Models::Components::Queue](../../models/shared/queue.md)> | :heavy_check_mark: | The items on this page. | +| `pagination` | [Models::Components::Pagination](../../models/shared/pagination.md) | :heavy_check_mark: | Where this page is in the full list. | \ No newline at end of file diff --git a/docs/models/operations/listwebhooksrequest.md b/docs/models/operations/listwebhooksrequest.md index a36c3d42..eb66065b 100644 --- a/docs/models/operations/listwebhooksrequest.md +++ b/docs/models/operations/listwebhooksrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/listwordlistsrequest.md b/docs/models/operations/listwordlistsrequest.md index 0ebdd2a0..0e601c03 100644 --- a/docs/models/operations/listwordlistsrequest.md +++ b/docs/models/operations/listwordlistsrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/mediatype.md b/docs/models/operations/mediatype.md deleted file mode 100644 index 5bedeca8..00000000 --- a/docs/models/operations/mediatype.md +++ /dev/null @@ -1,23 +0,0 @@ -# MediaType - -## Example Usage - -```ruby -require "moderation_api" - -value = MediaType::TEXT - -# Open enum: use .deserialize() to create instances from custom string values -custom = MediaType.deserialize("custom_value") -``` - - -## Values - -| Name | Value | -| -------- | -------- | -| `TEXT` | text | -| `IMAGE` | image | -| `VIDEO` | video | -| `OBJECT` | object | -| `AUDIO` | audio | \ No newline at end of file diff --git a/docs/models/operations/policyresponse.md b/docs/models/operations/policyresponse.md deleted file mode 100644 index 19998fae..00000000 --- a/docs/models/operations/policyresponse.md +++ /dev/null @@ -1,4 +0,0 @@ -# PolicyResponse - -Policy output schema. - diff --git a/docs/models/operations/previousperiod.md b/docs/models/operations/previousperiod.md new file mode 100644 index 00000000..bbdb1b0a --- /dev/null +++ b/docs/models/operations/previousperiod.md @@ -0,0 +1,17 @@ +# PreviousPeriod + +The same counts for the window of equal length just before this one. Compare with `totals` to see the trend. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `requests` | *::Integer* | :heavy_check_mark: | Requests received. Every request counts, also repeats and edits of the same content. | +| `flagged` | *::Integer* | :heavy_check_mark: | Requests that were flagged. | +| `flag_rate` | *::Float* | :heavy_check_mark: | The share of requests that were flagged: flagged / requests. 0 when there were no requests. | +| `allowed` | *::Integer* | :heavy_check_mark: | Requests with the recommendation "allow". Includes content that was not flagged. | +| `rejected` | *::Integer* | :heavy_check_mark: | Requests with the recommendation "reject". All of them were flagged. | +| `sent_to_review` | *::Integer* | :heavy_check_mark: | Requests with the recommendation "review". This counts requests, not the deduplicated items in the review queue. | +| `handled_automatically` | *::Integer* | :heavy_check_mark: | Flagged requests that were settled without human review: rejected plus flaggedButAllowed. | +| `flagged_but_allowed` | *::Integer* | :heavy_check_mark: | Flagged requests that were allowed without human review. | \ No newline at end of file diff --git a/docs/models/operations/queue.md b/docs/models/operations/queue.md deleted file mode 100644 index f47f85c3..00000000 --- a/docs/models/operations/queue.md +++ /dev/null @@ -1,14 +0,0 @@ -# Queue - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | N/A | -| `name` | *::String* | :heavy_check_mark: | N/A | -| `description` | *::String* | :heavy_check_mark: | N/A | -| `filter` | [Models::Operations::Filter](../../models/operations/filter.md) | :heavy_check_mark: | N/A | -| `unresolved_items_count` | *::Float* | :heavy_check_mark: | N/A | -| `resolved_items_count` | *::Float* | :heavy_check_mark: | N/A | -| `total_items_count` | *::Float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/recommendation.md b/docs/models/operations/recommendation.md index c3565494..259ce79d 100644 --- a/docs/models/operations/recommendation.md +++ b/docs/models/operations/recommendation.md @@ -7,6 +7,6 @@ The recommendation for the content based on the evaluation. | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `action` | [Models::Operations::SubmitContentRecommendationAction](../../models/operations/submitcontentrecommendationaction.md) | :heavy_check_mark: | The action to take based on the recommendation | +| `action` | [Models::Operations::ActionResponse](../../models/operations/actionresponse.md) | :heavy_check_mark: | The action to take based on the recommendation | | `reason_codes` | T::Array<[T.any(Models::Operations::ReasonCodeEnum, ::String)](../../models/operations/reasoncode.md)> | :heavy_check_mark: | Reason codes for the recommendation. Standard codes plus a `rule:` code identifying the rule that produced the action. Can be used to display a reason to the user. | | `matched_rules` | T::Array<[Models::Operations::MatchedRule](../../models/operations/matchedrule.md)> | :heavy_minus_sign: | Rules that matched during evaluation, if rules engine is active. | \ No newline at end of file diff --git a/docs/models/operations/removewordlistwordsrequest.md b/docs/models/operations/removewordlistwordsrequest.md index 409c03fd..c01dfb72 100644 --- a/docs/models/operations/removewordlistwordsrequest.md +++ b/docs/models/operations/removewordlistwordsrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | T::Array<*::String*> | :heavy_check_mark: | Array of words to remove from the wordlist | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | T::Array<*::String*> | :heavy_check_mark: | Array of words to remove from the wordlist | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/resolvequeueitemrequest.md b/docs/models/operations/resolvequeueitemrequest.md index c91d0aff..f6b827c2 100644 --- a/docs/models/operations/resolvequeueitemrequest.md +++ b/docs/models/operations/resolvequeueitemrequest.md @@ -3,9 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `item_id` | *::String* | :heavy_check_mark: | The item ID to resolve | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::ResolveQueueItemRequestBody](../../models/operations/resolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `item_id` | *::String* | :heavy_check_mark: | The item ID to resolve. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/resolvequeueitemrequestbody.md b/docs/models/operations/resolvequeueitemrequestbody.md deleted file mode 100644 index 8cc7e054..00000000 --- a/docs/models/operations/resolvequeueitemrequestbody.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResolveQueueItemRequestBody - - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `comment` | *T.nilable(::String)* | :heavy_minus_sign: | Optional comment | \ No newline at end of file diff --git a/docs/models/operations/resolvequeueitemresponsebody.md b/docs/models/operations/resolvequeueitemresponsebody.md index ae178fcb..5f6515da 100644 --- a/docs/models/operations/resolvequeueitemresponsebody.md +++ b/docs/models/operations/resolvequeueitemresponsebody.md @@ -5,8 +5,7 @@ Successful response ## Fields -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `success` | *T::Boolean* | :heavy_check_mark: | N/A | -| `resolved_at` | *::String* | :heavy_check_mark: | Timestamp when the item was resolved | -| `comment` | *T.nilable(::String)* | :heavy_minus_sign: | Optional comment | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `success` | *T::Boolean* | :heavy_check_mark: | N/A | +| `resolved_at` | *::String* | :heavy_check_mark: | When the item was resolved (ISO 8601). | \ No newline at end of file diff --git a/docs/models/operations/resolvequeueitemsrequest.md b/docs/models/operations/resolvequeueitemsrequest.md new file mode 100644 index 00000000..d37ab953 --- /dev/null +++ b/docs/models/operations/resolvequeueitemsrequest.md @@ -0,0 +1,10 @@ +# ResolveQueueItemsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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::Operations::ResolveQueueItemsRequestBody](../../models/operations/resolvequeueitemsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/resolvequeueitemsrequestbody.md b/docs/models/operations/resolvequeueitemsrequestbody.md new file mode 100644 index 00000000..c5e42980 --- /dev/null +++ b/docs/models/operations/resolvequeueitemsrequestbody.md @@ -0,0 +1,8 @@ +# ResolveQueueItemsRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `item_ids` | T::Array<*::String*> | :heavy_check_mark: | The item IDs to resolve. Up to 100. | \ No newline at end of file diff --git a/docs/models/operations/resolvequeueitemsresponse.md b/docs/models/operations/resolvequeueitemsresponse.md new file mode 100644 index 00000000..c4c50e25 --- /dev/null +++ b/docs/models/operations/resolvequeueitemsresponse.md @@ -0,0 +1,11 @@ +# ResolveQueueItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(Models::Operations::ResolveQueueItemsResponseBody)](../../models/operations/resolvequeueitemsresponsebody.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file diff --git a/docs/models/operations/resolvequeueitemsresponsebody.md b/docs/models/operations/resolvequeueitemsresponsebody.md new file mode 100644 index 00000000..e8228c93 --- /dev/null +++ b/docs/models/operations/resolvequeueitemsresponsebody.md @@ -0,0 +1,11 @@ +# ResolveQueueItemsResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `resolved` | *::Integer* | :heavy_check_mark: | Number of items resolved. | +| `not_found_ids` | T::Array<*::String*> | :heavy_check_mark: | Item IDs that do not exist in the project. | \ No newline at end of file diff --git a/docs/models/operations/reviewstats.md b/docs/models/operations/reviewstats.md index 5c6b8269..869d20b7 100644 --- a/docs/models/operations/reviewstats.md +++ b/docs/models/operations/reviewstats.md @@ -3,8 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `average_time_to_review` | *::Float* | :heavy_check_mark: | Average time in milliseconds to review an item | -| `total_reviewed` | *::Float* | :heavy_check_mark: | Total number of items reviewed | -| `total_pending` | *::Float* | :heavy_check_mark: | Total number of items pending review | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `total_reviewed` | *::Integer* | :heavy_check_mark: | Number of items resolved in this queue in the period. | +| `total_pending` | *::Integer* | :heavy_check_mark: | Number of items submitted in the period that wait for review now. | \ No newline at end of file diff --git a/docs/models/operations/rule.md b/docs/models/operations/rule.md new file mode 100644 index 00000000..0b9462e1 --- /dev/null +++ b/docs/models/operations/rule.md @@ -0,0 +1,9 @@ +# Rule + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `name` | *::String* | :heavy_check_mark: | The rule name. "Other rules" holds all rules after the largest ones. | +| `count` | *::Integer* | :heavy_check_mark: | Flagged requests that this rule settled. | \ No newline at end of file diff --git a/docs/models/operations/sort.md b/docs/models/operations/sort.md new file mode 100644 index 00000000..5339d244 --- /dev/null +++ b/docs/models/operations/sort.md @@ -0,0 +1,19 @@ +# Sort + +## Example Usage + +```ruby +require "moderation_api" + +value = Sort::FIFO +``` + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `FIFO` | FIFO | +| `LIFO` | LIFO | +| `RANDOM` | RANDOM | +| `SEVERITY_DESC` | SEVERITY_DESC | \ No newline at end of file diff --git a/docs/models/operations/sortby.md b/docs/models/operations/sortby.md index defb7001..024dc09b 100644 --- a/docs/models/operations/sortby.md +++ b/docs/models/operations/sortby.md @@ -15,7 +15,6 @@ value = SortBy::TRUST_LEVEL | ----------------------- | ----------------------- | | `TRUST_LEVEL` | trustLevel | | `VIOLATION_COUNT` | violationCount | -| `REPORT_COUNT` | reportCount | | `MEMBER_SINCE` | memberSince | | `LAST_ACTIVE` | lastActive | | `CONTENT_COUNT` | contentCount | diff --git a/docs/models/operations/listauthorssortdirection.md b/docs/models/operations/sortdirection.md similarity index 71% rename from docs/models/operations/listauthorssortdirection.md rename to docs/models/operations/sortdirection.md index 3aace68d..8ce3a5c4 100644 --- a/docs/models/operations/listauthorssortdirection.md +++ b/docs/models/operations/sortdirection.md @@ -1,4 +1,4 @@ -# ListAuthorsSortDirection +# SortDirection Sort direction @@ -7,7 +7,7 @@ Sort direction ```ruby require "moderation_api" -value = ListAuthorsSortDirection::ASC +value = SortDirection::ASC ``` diff --git a/docs/models/operations/sortfield.md b/docs/models/operations/sortfield.md deleted file mode 100644 index e2329012..00000000 --- a/docs/models/operations/sortfield.md +++ /dev/null @@ -1,18 +0,0 @@ -# SortField - -## Example Usage - -```ruby -require "moderation_api" - -value = SortField::CREATED_AT -``` - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `CREATED_AT` | createdAt | -| `SEVERITY` | severity | -| `REVIEWED_AT` | reviewedAt | \ No newline at end of file diff --git a/docs/models/operations/source.md b/docs/models/operations/source.md new file mode 100644 index 00000000..5387fc9c --- /dev/null +++ b/docs/models/operations/source.md @@ -0,0 +1,21 @@ +# Source + +Where the feedback was written: MCP server, agent skill, CLI or API. + +## Example Usage + +```ruby +require "moderation_api" + +value = Source::MCP +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `MCP` | mcp | +| `SKILL` | skill | +| `CLI` | cli | +| `API` | api | \ No newline at end of file diff --git a/docs/models/operations/author.md b/docs/models/operations/submitcontentauthor.md similarity index 99% rename from docs/models/operations/author.md rename to docs/models/operations/submitcontentauthor.md index 13ad3695..d1bdc573 100644 --- a/docs/models/operations/author.md +++ b/docs/models/operations/submitcontentauthor.md @@ -1,4 +1,4 @@ -# Author +# SubmitContentAuthor ## Fields diff --git a/docs/models/operations/submitcontentpolicyresponse.md b/docs/models/operations/submitcontentpolicyresponse.md new file mode 100644 index 00000000..a6f8ac94 --- /dev/null +++ b/docs/models/operations/submitcontentpolicyresponse.md @@ -0,0 +1,4 @@ +# SubmitContentPolicyResponse + +Policy output schema. + diff --git a/docs/models/operations/submitcontentrequest.md b/docs/models/operations/submitcontentrequest.md index b4a97672..de291b7e 100644 --- a/docs/models/operations/submitcontentrequest.md +++ b/docs/models/operations/submitcontentrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::SubmitContentRequestBody](../../models/operations/submitcontentrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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::Operations::SubmitContentRequestBody](../../models/operations/submitcontentrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/submitcontentrequestbody.md b/docs/models/operations/submitcontentrequestbody.md index bb0ee6ed..1d702916 100644 --- a/docs/models/operations/submitcontentrequestbody.md +++ b/docs/models/operations/submitcontentrequestbody.md @@ -14,5 +14,5 @@ | `conversation_id` | *T.nilable(::String)* | :heavy_minus_sign: | For example the ID of a chat room or a post | | `metadata` | T::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Any metadata you want to store with the content | | `client_action` | [T.nilable(Models::Operations::ClientAction)](../../models/operations/clientaction.md) | :heavy_minus_sign: | A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content. | -| `do_not_store` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Do not store the content. The content won't enter the review queue | +| `do_not_store` | *T.nilable(T::Boolean)* | :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` | T::Array<[T.any(Models::Operations::Toxicity, Models::Operations::PersonalInformation, Models::Operations::Hate, Models::Operations::Illicit, Models::Operations::IllicitDrugs, Models::Operations::IllicitAlcohol, Models::Operations::IllicitFirearms, Models::Operations::IllicitTobacco, Models::Operations::IllicitGambling, Models::Operations::Cannabis, Models::Operations::Adult, Models::Operations::Crypto, Models::Operations::Sexual, Models::Operations::SexualMinors, Models::Operations::Profanity, Models::Operations::Violence, Models::Operations::SelfHarm, Models::Operations::Spam, Models::Operations::LowQualityContent, Models::Operations::FaceDetection, Models::Operations::SelfPromotion, Models::Operations::Political, Models::Operations::Religion, Models::Operations::Threat, Models::Operations::SexualSolicitation, Models::Operations::ChannelCircumvention, Models::Operations::IllegalTrade, Models::Operations::Alcohol, Models::Operations::Drugs, Models::Operations::Gambling, Models::Operations::Tobacco, Models::Operations::Weapons, Models::Operations::Promotion, Models::Operations::Extremism, Models::Operations::CodeAbuse, Models::Operations::UnicodeSpoofing, Models::Operations::PIIMasking, Models::Operations::URLMasking, Models::Operations::URLRisk, Models::Operations::Guideline)](../../models/operations/policyrequest.md)> | :heavy_minus_sign: | (Enterprise) override the channel policies for this moderation request only. | \ No newline at end of file diff --git a/docs/models/operations/submitcontentresponsebody.md b/docs/models/operations/submitcontentresponsebody.md index d8e1391d..db00a157 100644 --- a/docs/models/operations/submitcontentresponsebody.md +++ b/docs/models/operations/submitcontentresponsebody.md @@ -8,11 +8,11 @@ Successful response | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `content` | [Models::Operations::ContentResponse](../../models/operations/contentresponse.md) | :heavy_check_mark: | Potentially modified content. | -| `author` | [T.nilable(Models::Operations::Author)](../../models/operations/author.md) | :heavy_check_mark: | The author of the content if your account has authors enabled. Requires you to send authorId when submitting content. | +| `author` | [T.nilable(Models::Operations::SubmitContentAuthor)](../../models/operations/submitcontentauthor.md) | :heavy_check_mark: | The author of the content if your account has authors enabled. Requires you to send authorId when submitting content. | | `evaluation` | [Models::Operations::Evaluation](../../models/operations/evaluation.md) | :heavy_check_mark: | The evaluation of the content after running the channel policies. | | `recommendation` | [Models::Operations::Recommendation](../../models/operations/recommendation.md) | :heavy_check_mark: | The recommendation for the content based on the evaluation. | | `casebook` | [T.nilable(Models::Operations::Casebook)](../../models/operations/casebook.md) | :heavy_check_mark: | What your casebook — the record of your past moderation decisions — found for this content, or null when it had nothing close enough to say, when the matching cases disagreed, or when casebook lookups are not switched on for this channel. Reports what the casebook found; whether it decided the outcome is shown in `recommendation`, where a higher-priority rule may have settled the item first. | -| `policies` | T::Array<[T.any(Models::Operations::ClassifierOutput, Models::Operations::EntityMatcherOutput)](../../models/operations/policyresponse.md)> | :heavy_check_mark: | Results of all policies in the channel. Sorted by highest probability. | +| `policies` | T::Array<[T.any(Models::Operations::ClassifierOutput, Models::Operations::EntityMatcherOutput)](../../models/operations/submitcontentpolicyresponse.md)> | :heavy_check_mark: | Results of all policies in the channel. Sorted by highest probability. | | `insights` | T::Array<[T.any(Models::Operations::SentimentInsight, Models::Operations::LanguageInsight, Models::Operations::CuriosityInsight, Models::Operations::RespectInsight, Models::Operations::PersonalStoryInsight, Models::Operations::CompassionInsight)](../../models/operations/insight.md)> | :heavy_check_mark: | Results of all insights enabled in the channel. | | `meta` | [Models::Operations::Meta](../../models/operations/meta.md) | :heavy_check_mark: | Metadata about the moderation request | | `errors` | T::Array<[Models::Operations::Error](../../models/operations/error.md)> | :heavy_minus_sign: | Policies that had errors | \ No newline at end of file diff --git a/docs/models/operations/topaction.md b/docs/models/operations/topaction.md deleted file mode 100644 index ef0546da..00000000 --- a/docs/models/operations/topaction.md +++ /dev/null @@ -1,10 +0,0 @@ -# TopAction - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `action_id` | *::String* | :heavy_check_mark: | Most used action by this reviewer | -| `action_name` | *::String* | :heavy_check_mark: | Name of the most used action | -| `count` | *::Float* | :heavy_check_mark: | Number of times this action was used | \ No newline at end of file diff --git a/docs/models/operations/topreviewer.md b/docs/models/operations/topreviewer.md index 7f89e4f8..f1b734ac 100644 --- a/docs/models/operations/topreviewer.md +++ b/docs/models/operations/topreviewer.md @@ -3,11 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `user_id` | *::String* | :heavy_check_mark: | ID of the reviewer | -| `name` | *::String* | :heavy_check_mark: | Name of the reviewer | -| `review_count` | *::Float* | :heavy_check_mark: | Number of items reviewed | -| `average_time_per_review` | *::Float* | :heavy_check_mark: | Average review time in milliseconds | -| `accuracy_score` | *T.nilable(::Float)* | :heavy_minus_sign: | Optional accuracy score based on review quality metrics | -| `top_actions` | T::Array<[Models::Operations::TopAction](../../models/operations/topaction.md)> | :heavy_check_mark: | Most common actions taken by this reviewer | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `user_id` | *T.nilable(::String)* | :heavy_check_mark: | The user ID of the reviewer. `null` for items resolved with an API key. | +| `name` | *T.nilable(::String)* | :heavy_check_mark: | The name of the reviewer. | +| `review_count` | *::Integer* | :heavy_check_mark: | Number of items the reviewer resolved in the period. | \ No newline at end of file diff --git a/docs/models/operations/totals.md b/docs/models/operations/totals.md new file mode 100644 index 00000000..19cd0f2f --- /dev/null +++ b/docs/models/operations/totals.md @@ -0,0 +1,18 @@ +# Totals + +Request counts for the window. A flagged request has one recommendation: allow, reject or review. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `requests` | *::Integer* | :heavy_check_mark: | Requests received. Every request counts, also repeats and edits of the same content. | +| `flagged` | *::Integer* | :heavy_check_mark: | Requests that were flagged. | +| `flag_rate` | *::Float* | :heavy_check_mark: | The share of requests that were flagged: flagged / requests. 0 when there were no requests. | +| `allowed` | *::Integer* | :heavy_check_mark: | Requests with the recommendation "allow". Includes content that was not flagged. | +| `rejected` | *::Integer* | :heavy_check_mark: | Requests with the recommendation "reject". All of them were flagged. | +| `sent_to_review` | *::Integer* | :heavy_check_mark: | Requests with the recommendation "review". This counts requests, not the deduplicated items in the review queue. | +| `handled_automatically` | *::Integer* | :heavy_check_mark: | Flagged requests that were settled without human review: rejected plus flaggedButAllowed. | +| `flagged_but_allowed` | *::Integer* | :heavy_check_mark: | Flagged requests that were allowed without human review. | +| `distinct_authors` | *::Integer* | :heavy_check_mark: | Distinct authors that sent content in the window. Approximate. | \ No newline at end of file diff --git a/docs/models/operations/trends.md b/docs/models/operations/trends.md index a79a7adc..2a3342cb 100644 --- a/docs/models/operations/trends.md +++ b/docs/models/operations/trends.md @@ -3,7 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `daily_review_counts` | T::Array<[Models::Operations::DailyReviewCount](../../models/operations/dailyreviewcount.md)> | :heavy_check_mark: | N/A | -| `flagged_content_trends` | T::Array<[Models::Operations::FlaggedContentTrend](../../models/operations/flaggedcontenttrend.md)> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `daily_review_counts` | T::Array<[Models::Operations::DailyReviewCount](../../models/operations/dailyreviewcount.md)> | :heavy_check_mark: | Resolved items per day. Days with no reviews are left out. | \ No newline at end of file diff --git a/docs/models/operations/unresolvequeueitemrequest.md b/docs/models/operations/unresolvequeueitemrequest.md index c6f932a5..daf2d2b5 100644 --- a/docs/models/operations/unresolvequeueitemrequest.md +++ b/docs/models/operations/unresolvequeueitemrequest.md @@ -3,9 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `item_id` | *::String* | :heavy_check_mark: | The item ID to unresolve | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::UnresolveQueueItemRequestBody](../../models/operations/unresolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `item_id` | *::String* | :heavy_check_mark: | The item ID to unresolve. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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/operations/unresolvequeueitemrequestbody.md b/docs/models/operations/unresolvequeueitemrequestbody.md deleted file mode 100644 index 97106e40..00000000 --- a/docs/models/operations/unresolvequeueitemrequestbody.md +++ /dev/null @@ -1,8 +0,0 @@ -# UnresolveQueueItemRequestBody - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `comment` | *T.nilable(::String)* | :heavy_minus_sign: | Optional reason for unresolving the item | \ No newline at end of file diff --git a/docs/models/operations/unresolvequeueitemresponsebody.md b/docs/models/operations/unresolvequeueitemresponsebody.md index f55b39ae..75c57b1a 100644 --- a/docs/models/operations/unresolvequeueitemresponsebody.md +++ b/docs/models/operations/unresolvequeueitemresponsebody.md @@ -5,8 +5,8 @@ Successful response ## Fields -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `success` | *T::Boolean* | :heavy_check_mark: | N/A | -| `status` | *::String* | :heavy_check_mark: | New status of the item | -| `unresolved_at` | *::String* | :heavy_check_mark: | Timestamp when the item was unresolved | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `success` | *T::Boolean* | :heavy_check_mark: | N/A | +| `status` | [Models::Operations::UnresolveQueueItemStatus](../../models/operations/unresolvequeueitemstatus.md) | :heavy_check_mark: | `pending` waits for review. `resolved` is reviewed. | +| `unresolved_at` | *::String* | :heavy_check_mark: | When the item was unresolved (ISO 8601). | \ No newline at end of file diff --git a/docs/models/operations/unresolvequeueitemstatus.md b/docs/models/operations/unresolvequeueitemstatus.md new file mode 100644 index 00000000..c4678072 --- /dev/null +++ b/docs/models/operations/unresolvequeueitemstatus.md @@ -0,0 +1,22 @@ +# UnresolveQueueItemStatus + +`pending` waits for review. `resolved` is reviewed. + +## Example Usage + +```ruby +require "moderation_api" + +value = UnresolveQueueItemStatus::PENDING + +# Open enum: use .deserialize() to create instances from custom string values +custom = UnresolveQueueItemStatus.deserialize("custom_value") +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PENDING` | pending | +| `RESOLVED` | resolved | \ No newline at end of file diff --git a/docs/models/operations/updateactionrequest.md b/docs/models/operations/updateactionrequest.md index 94449906..0ee78d6e 100644 --- a/docs/models/operations/updateactionrequest.md +++ b/docs/models/operations/updateactionrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to update. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::UpdateActionRequestBody](../../models/operations/updateactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to update. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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::Operations::UpdateActionRequestBody](../../models/operations/updateactionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateauthorrequest.md b/docs/models/operations/updateauthorrequest.md index a197064b..1e6fcdc9 100644 --- a/docs/models/operations/updateauthorrequest.md +++ b/docs/models/operations/updateauthorrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::UpdateAuthorRequestBody](../../models/operations/updateauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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::Operations::UpdateAuthorRequestBody](../../models/operations/updateauthorrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatewebhookrequest.md b/docs/models/operations/updatewebhookrequest.md index 9d1e0c39..ad988878 100644 --- a/docs/models/operations/updatewebhookrequest.md +++ b/docs/models/operations/updatewebhookrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to update. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::UpdateWebhookRequestBody](../../models/operations/updatewebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to update. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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::Operations::UpdateWebhookRequestBody](../../models/operations/updatewebhookrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatewordlistrequest.md b/docs/models/operations/updatewordlistrequest.md index 03be13ff..9e0da4a8 100644 --- a/docs/models/operations/updatewordlistrequest.md +++ b/docs/models/operations/updatewordlistrequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to update | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Models::Operations::UpdateWordlistRequestBody](../../models/operations/updatewordlistrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to update | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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::Operations::UpdateWordlistRequestBody](../../models/operations/updatewordlistrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatewordlistrequestbody.md b/docs/models/operations/updatewordlistrequestbody.md index b17e4917..60d71bf7 100644 --- a/docs/models/operations/updatewordlistrequestbody.md +++ b/docs/models/operations/updatewordlistrequestbody.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `name` | *T.nilable(::String)* | :heavy_minus_sign: | New name for the wordlist | -| `key` | *T.nilable(::String)* | :heavy_minus_sign: | New key for the wordlist | -| `description` | *T.nilable(::String)* | :heavy_minus_sign: | New description for the wordlist | -| `words` | T::Array<*::String*> | :heavy_minus_sign: | New words for the wordlist. Replace the existing words with these new ones. Duplicate words will be ignored. | -| `strict` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Deprecated. Now using threshold in project settings. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | New name for the wordlist | +| `key` | *T.nilable(::String)* | :heavy_minus_sign: | New key for the wordlist | +| `description` | *T.nilable(::String)* | :heavy_minus_sign: | New description for the wordlist | +| `words` | T::Array<*::String*> | :heavy_minus_sign: | New words for the wordlist. Replace the existing words with these new ones. Words are converted to lowercase. Duplicate and empty words are ignored. Maximum 5000 words. | +| `strict` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | Deprecated. Now using threshold in project settings. | \ No newline at end of file diff --git a/docs/models/operations/volume.md b/docs/models/operations/volume.md new file mode 100644 index 00000000..c58d2417 --- /dev/null +++ b/docs/models/operations/volume.md @@ -0,0 +1,12 @@ +# Volume + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `start` | *::String* | :heavy_check_mark: | Start of the bucket, as an ISO 8601 timestamp in UTC. | +| `requests` | *::Integer* | :heavy_check_mark: | Requests received in the bucket. | +| `flagged` | *::Integer* | :heavy_check_mark: | Requests flagged in the bucket. | +| `rejected` | *::Integer* | :heavy_check_mark: | Requests with the recommendation "reject" in the bucket. | +| `sent_to_review` | *::Integer* | :heavy_check_mark: | Requests with the recommendation "review" in the bucket. | \ No newline at end of file diff --git a/docs/models/operations/withinunit.md b/docs/models/operations/withinunit.md deleted file mode 100644 index e29cd47e..00000000 --- a/docs/models/operations/withinunit.md +++ /dev/null @@ -1,24 +0,0 @@ -# WithinUnit - -## Example Usage - -```ruby -require "moderation_api" - -value = WithinUnit::MINUTES - -# Open enum: use .deserialize() to create instances from custom string values -custom = WithinUnit.deserialize("custom_value") -``` - - -## Values - -| Name | Value | -| --------- | --------- | -| `MINUTES` | MINUTES | -| `HOURS` | HOURS | -| `DAYS` | DAYS | -| `WEEKS` | WEEKS | -| `MONTHS` | MONTHS | -| `YEARS` | YEARS | \ No newline at end of file diff --git a/docs/sdks/account/README.md b/docs/sdks/account/README.md index 41a23828..75a2fe93 100644 --- a/docs/sdks/account/README.md +++ b/docs/sdks/account/README.md @@ -30,9 +30,9 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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. | ### Response diff --git a/docs/sdks/actions/README.md b/docs/sdks/actions/README.md index 5ac1bb6a..2d8ea213 100644 --- a/docs/sdks/actions/README.md +++ b/docs/sdks/actions/README.md @@ -35,12 +35,12 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `queue_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queue_id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -87,10 +87,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `body` | [Models::Operations::CreateActionRequestBody](../../models/operations/createactionrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::CreateActionRequestBody](../../models/operations/createactionrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -130,10 +130,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to get. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to get. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -173,11 +173,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to update. | -| `body` | [Models::Operations::UpdateActionRequestBody](../../models/operations/updateactionrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to update. | +| `body` | [Models::Operations::UpdateActionRequestBody](../../models/operations/updateactionrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -218,10 +218,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the action to delete. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the action to delete. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -266,10 +266,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `body` | [Models::Operations::ExecuteActionRequestBody](../../models/operations/executeactionrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::ExecuteActionRequestBody](../../models/operations/executeactionrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md new file mode 100644 index 00000000..278348cb --- /dev/null +++ b/docs/sdks/analytics/README.md @@ -0,0 +1,289 @@ +# Analytics + +## Overview + +### Available Operations + +* [summary](#summary) - Get the analytics summary +* [policies](#policies) - Get the most flagged policies +* [authors](#authors) - Get the most flagged authors +* [channels](#channels) - Get analytics per channel +* [volumes](#volumes) - Get volumes over time +* [automation](#automation) - Get the automation breakdown + +## summary + +Get the totals of the project for a time window: requests, flags, flag rate, allowed, rejected and sent to review, with the window before for the trend. Also the review queue backlog and a flag-rate spike, if there is one. + +### Example Usage + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.analytics.summary(range: Models::Operations::GetAnalyticsSummaryQueryParamRange::THIRTYD) + +unless res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsSummaryQueryParamRange)](../../models/operations/getanalyticssummaryqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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. | + +### Response + +**[T.nilable(Models::Operations::GetAnalyticsSummaryResponse)](../../models/operations/getanalyticssummaryresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::PermissionDeniedError | 403 | application/json | +| Models::Errors::NotFoundError | 404 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Models::Errors::InternalServerError | 500 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## policies + +Get the policy labels that flagged the most content in a time window, largest first, with the count in the window before. + +### Example Usage + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.analytics.policies(range: Models::Operations::GetAnalyticsPoliciesQueryParamRange::THIRTYD, limit: 8) + +unless res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsPoliciesQueryParamRange)](../../models/operations/getanalyticspoliciesqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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. | + +### Response + +**[T.nilable(Models::Operations::GetAnalyticsPoliciesResponse)](../../models/operations/getanalyticspoliciesresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::PermissionDeniedError | 403 | application/json | +| Models::Errors::NotFoundError | 404 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Models::Errors::InternalServerError | 500 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## authors + +Get the authors with the most flagged content in a time window, largest first. + +### Example Usage + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.analytics.authors(range: Models::Operations::GetAnalyticsAuthorsQueryParamRange::THIRTYD, limit: 6) + +unless res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsAuthorsQueryParamRange)](../../models/operations/getanalyticsauthorsqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `limit` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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. | + +### Response + +**[T.nilable(Models::Operations::GetAnalyticsAuthorsResponse)](../../models/operations/getanalyticsauthorsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::PermissionDeniedError | 403 | application/json | +| Models::Errors::NotFoundError | 404 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Models::Errors::InternalServerError | 500 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## channels + +Get requests, flags and flag rate for each channel of the project in a time window. + +### Example Usage + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.analytics.channels(range: Models::Operations::GetAnalyticsChannelsQueryParamRange::THIRTYD) + +unless res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsChannelsQueryParamRange)](../../models/operations/getanalyticschannelsqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `project_id` | *T.nilable(::String)* | :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. | + +### Response + +**[T.nilable(Models::Operations::GetAnalyticsChannelsResponse)](../../models/operations/getanalyticschannelsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::PermissionDeniedError | 403 | application/json | +| Models::Errors::NotFoundError | 404 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Models::Errors::InternalServerError | 500 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## volumes + +Get requests, flags, rejections and reviews per hour (24h) or per day (7d, 30d, 90d), oldest first. + +### Example Usage + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.analytics.volumes(range: Models::Operations::GetAnalyticsVolumesQueryParamRange::THIRTYD) + +unless res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsVolumesQueryParamRange)](../../models/operations/getanalyticsvolumesqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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. | + +### Response + +**[T.nilable(Models::Operations::GetAnalyticsVolumesResponse)](../../models/operations/getanalyticsvolumesresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::PermissionDeniedError | 403 | application/json | +| Models::Errors::NotFoundError | 404 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Models::Errors::InternalServerError | 500 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + +## automation + +Get how flagged content was handled in a time window: settled by rules or the casebook, or sent to human review, and what the reviewers decided. + +### Example Usage + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.analytics.automation(range: Models::Operations::GetAnalyticsAutomationQueryParamRange::THIRTYD) + +unless res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [T.nilable(Models::Operations::GetAnalyticsAutomationQueryParamRange)](../../models/operations/getanalyticsautomationqueryparamrange.md) | :heavy_minus_sign: | The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. | +| `channel` | *T.nilable(::String)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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. | + +### Response + +**[T.nilable(Models::Operations::GetAnalyticsAutomationResponse)](../../models/operations/getanalyticsautomationresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::PermissionDeniedError | 403 | application/json | +| Models::Errors::NotFoundError | 404 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Models::Errors::InternalServerError | 500 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md new file mode 100644 index 00000000..4d93bff9 --- /dev/null +++ b/docs/sdks/apikeys/README.md @@ -0,0 +1,51 @@ +# 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 + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.projects.api_keys.create(id: '', body: Models::Operations::CreateProjectApiKeyRequestBody.new) + +unless res.project_api_key.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the project. | +| `body` | [Models::Operations::CreateProjectApiKeyRequestBody](../../models/operations/createprojectapikeyrequestbody.md) | :heavy_check_mark: | N/A | + +### Response + +**[T.nilable(Models::Operations::CreateProjectApiKeyResponse)](../../models/operations/createprojectapikeyresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::PermissionDeniedError | 403 | application/json | +| Models::Errors::NotFoundError | 404 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/authors/README.md b/docs/sdks/authors/README.md index 50c90090..fe065d60 100644 --- a/docs/sdks/authors/README.md +++ b/docs/sdks/authors/README.md @@ -12,7 +12,7 @@ ## list -List authors with their activity metrics and reputation. The list is paginated. +List the authors of the project, with their status, trust level and content metrics. The list is paginated. By default, the authors that were active most recently come first. ### Example Usage @@ -88,10 +88,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `body` | [Models::Operations::CreateAuthorRequestBody](../../models/operations/createauthorrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::CreateAuthorRequestBody](../../models/operations/createauthorrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -132,10 +132,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -182,11 +182,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `body` | [Models::Operations::UpdateAuthorRequestBody](../../models/operations/updateauthorrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `body` | [Models::Operations::UpdateAuthorRequestBody](../../models/operations/updateauthorrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -228,10 +228,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response diff --git a/docs/sdks/content/README.md b/docs/sdks/content/README.md index e5c3426f..2b5dae12 100644 --- a/docs/sdks/content/README.md +++ b/docs/sdks/content/README.md @@ -41,10 +41,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `body` | [Models::Operations::SubmitContentRequestBody](../../models/operations/submitcontentrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::SubmitContentRequestBody](../../models/operations/submitcontentrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response diff --git a/docs/sdks/feedback/README.md b/docs/sdks/feedback/README.md new file mode 100644 index 00000000..6f7ae0e7 --- /dev/null +++ b/docs/sdks/feedback/README.md @@ -0,0 +1,53 @@ +# Feedback + +## Overview + +### Available Operations + +* [create](#create) - Send feedback + +## create + +Sends a feature request, bug report or other feedback to the Moderation API team. The team reads every request and can reply by email. Limited to 5 requests per minute per organization. + +### Example Usage + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.feedback.create(body: Models::Operations::CreateFeedbackRequestBody.new( + title: 'Filter queue items by author trust level', + description: 'We review queue items by hand. We want to see items from new authors first, so we need a filter for trust level on the queue items list.', + source: Models::Operations::Source::MCP +)) + +unless res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::CreateFeedbackRequestBody](../../models/operations/createfeedbackrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :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. | + +### Response + +**[T.nilable(Models::Operations::CreateFeedbackResponse)](../../models/operations/createfeedbackresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/items/README.md b/docs/sdks/items/README.md index 699084e3..b163aa4d 100644 --- a/docs/sdks/items/README.md +++ b/docs/sdks/items/README.md @@ -4,13 +4,14 @@ ### Available Operations -* [list](#list) - Get queue items +* [list](#list) - List queue items * [resolve](#resolve) - Resolve a queue item +* [resolve_many](#resolve_many) - Resolve queue items * [unresolve](#unresolve) - Unresolve a queue item ## list -Get paginated list of items in a moderation queue with filtering options +List the items of a review queue, with the filters and the date window of the queue applied. By default only pending items. The list is paginated. Use the item `id` to resolve or unresolve an item. ### Example Usage @@ -58,7 +59,7 @@ end ## resolve -Mark a queue item as resolved with a specific moderation action +Mark an item of a queue as resolved. It is the same as a check-off in the dashboard: the item leaves the pending list and a QUEUE_ITEM_COMPLETED webhook is sent. To also take a moderation action, use `POST /actions/execute`. ### Example Usage @@ -70,9 +71,7 @@ Models = ::ModerationApi::Models s = ::ModerationApi::ModerationApi.new( secret_key: '' ) -res = s.queue.items.resolve(id: '', item_id: '', body: Models::Operations::ResolveQueueItemRequestBody.new( - comment: 'Reviewed: no violation.' -)) +res = s.queue.items.resolve(id: '', item_id: '') unless res.object.nil? # handle response @@ -82,12 +81,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `item_id` | *::String* | :heavy_check_mark: | The item ID to resolve | -| `body` | [Models::Operations::ResolveQueueItemRequestBody](../../models/operations/resolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `item_id` | *::String* | :heavy_check_mark: | The item ID to resolve. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -104,9 +102,59 @@ end | Models::Errors::InternalServerError | 500 | application/json | | Errors::APIError | 4XX, 5XX | \*/\* | +## resolve_many + +Mark up to 100 items of a queue as resolved in one request. Each item is resolved the same as with `POST /queue/{id}/items/{itemId}/resolve`. IDs that do not exist in the project are skipped and returned in `notFoundIds`. + +### Example Usage + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.queue.items.resolve_many(id: '', body: Models::Operations::ResolveQueueItemsRequestBody.new( + item_ids: [ + 'clx8k2v0e000108l4a9bz3f7q', + 'clx8k2v0e000208l4h2mc6d1r', + ] +)) + +unless res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `body` | [Models::Operations::ResolveQueueItemsRequestBody](../../models/operations/resolvequeueitemsrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :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. | + +### Response + +**[T.nilable(Models::Operations::ResolveQueueItemsResponse)](../../models/operations/resolvequeueitemsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::PermissionDeniedError | 403 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Models::Errors::InternalServerError | 500 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + ## unresolve -Mark a previously resolved queue item as unresolved/pending +Mark a resolved item of a queue as pending again. It is the same as removing a check-off in the dashboard: the item comes back in the pending list. ### Example Usage @@ -118,9 +166,7 @@ Models = ::ModerationApi::Models s = ::ModerationApi::ModerationApi.new( secret_key: '' ) -res = s.queue.items.unresolve(id: '', item_id: '', body: Models::Operations::UnresolveQueueItemRequestBody.new( - comment: 'Reopened after an appeal.' -)) +res = s.queue.items.unresolve(id: '', item_id: '') unless res.object.nil? # handle response @@ -130,12 +176,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `item_id` | *::String* | :heavy_check_mark: | The item ID to unresolve | -| `body` | [Models::Operations::UnresolveQueueItemRequestBody](../../models/operations/unresolvequeueitemrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `item_id` | *::String* | :heavy_check_mark: | The item ID to unresolve. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response diff --git a/docs/sdks/queue/README.md b/docs/sdks/queue/README.md index 1487478a..c97a70ad 100644 --- a/docs/sdks/queue/README.md +++ b/docs/sdks/queue/README.md @@ -4,12 +4,59 @@ ### Available Operations +* [list](#list) - List queues * [retrieve](#retrieve) - Get a queue * [get_stats](#get_stats) - Get queue statistics +## list + +List the review queues of the project. The default queue comes first. The list is paginated. To get the item counts of a queue, use `GET /queue/{id}`. + +### Example Usage + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.queue.list(page: 1, page_size: 20) + +unless res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :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. | + +### Response + +**[T.nilable(Models::Operations::ListQueuesResponse)](../../models/operations/listqueuesresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::PermissionDeniedError | 403 | application/json | +| Models::Errors::NotFoundError | 404 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Models::Errors::InternalServerError | 500 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + ## retrieve -Get a queue +Get a review queue with its item counts. The counts use the filters and the date window of the queue, the same as the dashboard. ### Example Usage @@ -31,10 +78,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -54,7 +101,7 @@ end ## get_stats -Get detailed statistics about a moderation queue including review times, action counts, and trends +Get review statistics of a queue for a period: resolved and pending items, the top reviewers and the resolved items per day. ### Example Usage @@ -76,11 +123,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The queue ID | -| `within_days` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The queue ID. | +| `within_days` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index d12cc446..92786f6d 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -34,11 +34,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -83,10 +83,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `body` | [Models::Operations::CreateWebhookRequestBody](../../models/operations/createwebhookrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::CreateWebhookRequestBody](../../models/operations/createwebhookrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -125,10 +125,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to get. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to get. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -167,11 +167,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to update. | -| `body` | [Models::Operations::UpdateWebhookRequestBody](../../models/operations/updatewebhookrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to update. | +| `body` | [Models::Operations::UpdateWebhookRequestBody](../../models/operations/updatewebhookrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -211,10 +211,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to delete. | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The ID of the webhook to delete. | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response diff --git a/docs/sdks/webhooksecret/README.md b/docs/sdks/webhooksecret/README.md index b2e91e4d..e1cbd00a 100644 --- a/docs/sdks/webhooksecret/README.md +++ b/docs/sdks/webhooksecret/README.md @@ -30,9 +30,9 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `project_id` | *T.nilable(::String)* | :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. | ### Response diff --git a/docs/sdks/wordlist/README.md b/docs/sdks/wordlist/README.md index 3cddafef..4ea5bbdd 100644 --- a/docs/sdks/wordlist/README.md +++ b/docs/sdks/wordlist/README.md @@ -5,6 +5,7 @@ ### Available Operations * [list](#list) - List wordlists +* [create](#create) - Create wordlist * [retrieve](#retrieve) - Get wordlist * [update](#update) - Update wordlist * [get_embedding_status](#get_embedding_status) - Get embedding status @@ -33,11 +34,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `page_size` | *T.nilable(::Integer)* | :heavy_minus_sign: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -55,6 +56,50 @@ end | Models::Errors::InternalServerError | 500 | application/json | | Errors::APIError | 4XX, 5XX | \*/\* | +## create + +Create a wordlist in the organization. You can add words now or later. Each word is embedded in the background for similarity matching. Use the embedding status endpoint to follow the progress. To use the wordlist in moderation, add it to a policy. + +### Example Usage + + +```ruby +require 'moderation_api' + +Models = ::ModerationApi::Models +s = ::ModerationApi::ModerationApi.new( + secret_key: '' +) +res = s.wordlist.create(body: Models::Operations::CreateWordlistRequestBody.new( + name: '' +)) + +unless res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Models::Operations::CreateWordlistRequestBody](../../models/operations/createwordlistrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :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. | + +### Response + +**[T.nilable(Models::Operations::CreateWordlistResponse)](../../models/operations/createwordlistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| Models::Errors::BadRequestError | 400 | application/json | +| Models::Errors::AuthenticationError | 401 | application/json | +| Models::Errors::RateLimitError | 429 | application/json | +| Errors::APIError | 4XX, 5XX | \*/\* | + ## retrieve Get a specific wordlist by ID @@ -79,10 +124,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to get | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to get | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -102,7 +147,7 @@ end ## update -Update a wordlist +Update a wordlist. Fields that you do not send stay the same. If you send words, they replace all existing words, and the embeddings are updated in the background. ### Example Usage @@ -124,11 +169,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to update | -| `body` | [Models::Operations::UpdateWordlistRequestBody](../../models/operations/updatewordlistrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to update | +| `body` | [Models::Operations::UpdateWordlistRequestBody](../../models/operations/updatewordlistrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -168,10 +213,10 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to check embedding status for | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response diff --git a/docs/sdks/words/README.md b/docs/sdks/words/README.md index de72ed67..56ccf9dc 100644 --- a/docs/sdks/words/README.md +++ b/docs/sdks/words/README.md @@ -36,11 +36,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to add words to | -| `body` | [Models::Operations::AddWordlistWordsRequestBody](../../models/operations/addwordlistwordsrequestbody.md) | :heavy_check_mark: | N/A | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to add words to | +| `body` | [Models::Operations::AddWordlistWordsRequestBody](../../models/operations/addwordlistwordsrequestbody.md) | :heavy_check_mark: | N/A | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response @@ -84,11 +84,11 @@ end ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | T::Array<*::String*> | :heavy_check_mark: | Array of words to remove from the wordlist | -| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | T::Array<*::String*> | :heavy_check_mark: | Array of words to remove from the wordlist | +| `project_id` | *T.nilable(::String)* | :heavy_minus_sign: | The project to act on, 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. | ### Response diff --git a/lib/moderation_api.rb b/lib/moderation_api.rb index d3e4c44a..3f982e37 100644 --- a/lib/moderation_api.rb +++ b/lib/moderation_api.rb @@ -5,7 +5,9 @@ module ModerationApi autoload :ModerationApi, "moderation_api/moderationapi" + autoload :Analytics, "moderation_api/analytics" autoload :Authors, "moderation_api/authors" + autoload :Feedback, "moderation_api/feedback" autoload :Queue, "moderation_api/queue" autoload :Items, "moderation_api/items" autoload :Actions, "moderation_api/actions" @@ -16,6 +18,7 @@ module ModerationApi autoload :Words, "moderation_api/words" autoload :Content, "moderation_api/content" autoload :Projects, "moderation_api/projects" + autoload :ApiKeys, "moderation_api/apikeys" autoload :Channels, "moderation_api/channels" module Models diff --git a/lib/moderation_api/analytics.rb b/lib/moderation_api/analytics.rb new file mode 100644 index 00000000..2bb2d24c --- /dev/null +++ b/lib/moderation_api/analytics.rb @@ -0,0 +1,1746 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require "faraday" +require "faraday/multipart" +require "faraday/retry" +require "sorbet-runtime" + +require_relative "sdk_hooks/hooks" +require_relative "utils/retries" + +module ModerationApi + extend T::Sig + + class Analytics + extend T::Sig + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) } + def get_url(base_url:, url_variables: nil) + sd_base_url, sd_options = @sdk_configuration.get_server_details + + if base_url.nil? + base_url = sd_base_url + end + + if url_variables.nil? + url_variables = sd_options + end + + return Utils.template_url(base_url, url_variables) + end + + sig { + params( + range: T.nilable(Models::Operations::GetAnalyticsSummaryQueryParamRange), + channel: T.nilable(::String), + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::GetAnalyticsSummaryResponse) + } + def summary(range: nil, channel: nil, project_id: nil, timeout_ms: nil, http_headers: nil) + # summary - Get the analytics summary + # Get the totals of the project for a time window: requests, flags, flag rate, allowed, rejected and sent to review, with the window before for the trend. Also the review queue backlog and a flag-rate spike, if there is one. + request = Models::Operations::GetAnalyticsSummaryRequest.new( + range: range, + channel: channel, + project_id: project_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/analytics/summary" + headers = Utils.get_headers(request) + headers = T.cast(headers, T::Hash[String, String]) + query_params = Utils.get_query_params(Models::Operations::GetAnalyticsSummaryRequest, request, nil) + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "getAnalyticsSummary", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json( + JSON.parse(response_data), + Models::Operations::GetAnalyticsSummaryResponseBody + ) + response = Models::Operations::GetAnalyticsSummaryResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: T.unsafe(obj) + ) + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["403"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["404"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["500"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + + sig { + params( + range: T.nilable(Models::Operations::GetAnalyticsPoliciesQueryParamRange), + channel: T.nilable(::String), + limit: T.nilable(::Integer), + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::GetAnalyticsPoliciesResponse) + } + def policies(range: nil, channel: nil, limit: nil, project_id: nil, timeout_ms: nil, http_headers: nil) + # policies - Get the most flagged policies + # Get the policy labels that flagged the most content in a time window, largest first, with the count in the window before. + request = Models::Operations::GetAnalyticsPoliciesRequest.new( + range: range, + channel: channel, + limit: limit, + project_id: project_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/analytics/policies" + headers = Utils.get_headers(request) + headers = T.cast(headers, T::Hash[String, String]) + query_params = Utils.get_query_params(Models::Operations::GetAnalyticsPoliciesRequest, request, nil) + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "getAnalyticsPolicies", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json( + JSON.parse(response_data), + Models::Operations::GetAnalyticsPoliciesResponseBody + ) + response = Models::Operations::GetAnalyticsPoliciesResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: T.unsafe(obj) + ) + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["403"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["404"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["500"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + + sig { + params( + range: T.nilable(Models::Operations::GetAnalyticsAuthorsQueryParamRange), + channel: T.nilable(::String), + limit: T.nilable(::Integer), + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::GetAnalyticsAuthorsResponse) + } + def authors(range: nil, channel: nil, limit: nil, project_id: nil, timeout_ms: nil, http_headers: nil) + # authors - Get the most flagged authors + # Get the authors with the most flagged content in a time window, largest first. + request = Models::Operations::GetAnalyticsAuthorsRequest.new( + range: range, + channel: channel, + limit: limit, + project_id: project_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/analytics/authors" + headers = Utils.get_headers(request) + headers = T.cast(headers, T::Hash[String, String]) + query_params = Utils.get_query_params(Models::Operations::GetAnalyticsAuthorsRequest, request, nil) + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "getAnalyticsAuthors", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json( + JSON.parse(response_data), + Models::Operations::GetAnalyticsAuthorsResponseBody + ) + response = Models::Operations::GetAnalyticsAuthorsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: T.unsafe(obj) + ) + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["403"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["404"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["500"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + + sig { + params( + range: T.nilable(Models::Operations::GetAnalyticsChannelsQueryParamRange), + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::GetAnalyticsChannelsResponse) + } + def channels(range: nil, project_id: nil, timeout_ms: nil, http_headers: nil) + # channels - Get analytics per channel + # Get requests, flags and flag rate for each channel of the project in a time window. + request = Models::Operations::GetAnalyticsChannelsRequest.new( + range: range, + project_id: project_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/analytics/channels" + headers = Utils.get_headers(request) + headers = T.cast(headers, T::Hash[String, String]) + query_params = Utils.get_query_params(Models::Operations::GetAnalyticsChannelsRequest, request, nil) + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "getAnalyticsChannels", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json( + JSON.parse(response_data), + Models::Operations::GetAnalyticsChannelsResponseBody + ) + response = Models::Operations::GetAnalyticsChannelsResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: T.unsafe(obj) + ) + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["403"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["404"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["500"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + + sig { + params( + range: T.nilable(Models::Operations::GetAnalyticsVolumesQueryParamRange), + channel: T.nilable(::String), + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::GetAnalyticsVolumesResponse) + } + def volumes(range: nil, channel: nil, project_id: nil, timeout_ms: nil, http_headers: nil) + # volumes - Get volumes over time + # Get requests, flags, rejections and reviews per hour (24h) or per day (7d, 30d, 90d), oldest first. + request = Models::Operations::GetAnalyticsVolumesRequest.new( + range: range, + channel: channel, + project_id: project_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/analytics/volumes" + headers = Utils.get_headers(request) + headers = T.cast(headers, T::Hash[String, String]) + query_params = Utils.get_query_params(Models::Operations::GetAnalyticsVolumesRequest, request, nil) + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "getAnalyticsVolumes", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json( + JSON.parse(response_data), + Models::Operations::GetAnalyticsVolumesResponseBody + ) + response = Models::Operations::GetAnalyticsVolumesResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: T.unsafe(obj) + ) + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["403"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["404"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["500"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + + sig { + params( + range: T.nilable(Models::Operations::GetAnalyticsAutomationQueryParamRange), + channel: T.nilable(::String), + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::GetAnalyticsAutomationResponse) + } + def automation(range: nil, channel: nil, project_id: nil, timeout_ms: nil, http_headers: nil) + # automation - Get the automation breakdown + # Get how flagged content was handled in a time window: settled by rules or the casebook, or sent to human review, and what the reviewers decided. + request = Models::Operations::GetAnalyticsAutomationRequest.new( + range: range, + channel: channel, + project_id: project_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/analytics/automation" + headers = Utils.get_headers(request) + headers = T.cast(headers, T::Hash[String, String]) + query_params = Utils.get_query_params(Models::Operations::GetAnalyticsAutomationRequest, request, nil) + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "getAnalyticsAutomation", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json( + JSON.parse(response_data), + Models::Operations::GetAnalyticsAutomationResponseBody + ) + response = Models::Operations::GetAnalyticsAutomationResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: T.unsafe(obj) + ) + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["403"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["404"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["500"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + end +end diff --git a/lib/moderation_api/apikeys.rb b/lib/moderation_api/apikeys.rb new file mode 100644 index 00000000..44c21f04 --- /dev/null +++ b/lib/moderation_api/apikeys.rb @@ -0,0 +1,313 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require "faraday" +require "faraday/multipart" +require "faraday/retry" +require "sorbet-runtime" + +require_relative "sdk_hooks/hooks" +require_relative "utils/retries" + +module ModerationApi + extend T::Sig + + class ApiKeys + extend T::Sig + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) } + def get_url(base_url:, url_variables: nil) + sd_base_url, sd_options = @sdk_configuration.get_server_details + + if base_url.nil? + base_url = sd_base_url + end + + if url_variables.nil? + url_variables = sd_options + end + + return Utils.template_url(base_url, url_variables) + end + + sig { + params( + body: Models::Operations::CreateProjectApiKeyRequestBody, + id: ::String, + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::CreateProjectApiKeyResponse) + } + def create(body:, id:, timeout_ms: nil, http_headers: nil) + # create - 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. + request = Models::Operations::CreateProjectApiKeyRequest.new( + id: id, + body: body + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::CreateProjectApiKeyRequest, + base_url, + "/projects/{id}/api-keys", + request + ) + headers = {} + headers = T.cast(headers, T::Hash[String, String]) + req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) + headers["content-type"] = req_content_type + raise StandardError, "request body is required" if data.nil? && form.nil? + + if form && !form.empty? + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, "application/x-www-form-urlencoded") + body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) + else + body = data + end + + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "createProjectApiKey", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::ProjectApiKey) + response = Models::Operations::CreateProjectApiKeyResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + project_api_key: T.unsafe(obj) + ) + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["403"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["404"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + end +end diff --git a/lib/moderation_api/authors.rb b/lib/moderation_api/authors.rb index 360eee7d..af4758e9 100644 --- a/lib/moderation_api/authors.rb +++ b/lib/moderation_api/authors.rb @@ -48,7 +48,7 @@ def get_url(base_url:, url_variables: nil) } def list(request:, timeout_ms: nil, http_headers: nil) # list - List authors - # List authors with their activity metrics and reputation. The list is paginated. + # List the authors of the project, with their status, trust level and content metrics. The list is paginated. By default, the authors that were active most recently come first. url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/authors" @@ -173,7 +173,6 @@ def list(request:, timeout_ms: nil, http_headers: nil) sort_direction: request.sort_direction, member_since_date: request.member_since_date, last_active_date: request.last_active_date, - content_types: request.content_types, project_id: request.project_id ), http_headers: http_headers diff --git a/lib/moderation_api/feedback.rb b/lib/moderation_api/feedback.rb new file mode 100644 index 00000000..f819f6ca --- /dev/null +++ b/lib/moderation_api/feedback.rb @@ -0,0 +1,264 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require "faraday" +require "faraday/multipart" +require "faraday/retry" +require "sorbet-runtime" + +require_relative "sdk_hooks/hooks" +require_relative "utils/retries" + +module ModerationApi + extend T::Sig + + class Feedback + extend T::Sig + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) } + def get_url(base_url:, url_variables: nil) + sd_base_url, sd_options = @sdk_configuration.get_server_details + + if base_url.nil? + base_url = sd_base_url + end + + if url_variables.nil? + url_variables = sd_options + end + + return Utils.template_url(base_url, url_variables) + end + + sig { + params( + body: Models::Operations::CreateFeedbackRequestBody, + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::CreateFeedbackResponse) + } + def create(body:, project_id: nil, timeout_ms: nil, http_headers: nil) + # create - Send feedback + # Sends a feature request, bug report or other feedback to the Moderation API team. The team reads every request and can reply by email. Limited to 5 requests per minute per organization. + request = Models::Operations::CreateFeedbackRequest.new( + body: body, + project_id: project_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/feedback" + headers = Utils.get_headers(request) + headers = T.cast(headers, T::Hash[String, String]) + req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) + headers["content-type"] = req_content_type + raise StandardError, "request body is required" if data.nil? && form.nil? + + if form && !form.empty? + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, "application/x-www-form-urlencoded") + body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) + else + body = data + end + + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "createFeedback", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Operations::CreateFeedbackResponseBody) + response = Models::Operations::CreateFeedbackResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: T.unsafe(obj) + ) + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + end +end diff --git a/lib/moderation_api/items.rb b/lib/moderation_api/items.rb index e1cfdfbc..91ce20e1 100644 --- a/lib/moderation_api/items.rb +++ b/lib/moderation_api/items.rb @@ -47,8 +47,8 @@ def get_url(base_url:, url_variables: nil) .returns(Models::Operations::ListQueueItemsResponse) } def list(request:, timeout_ms: nil, http_headers: nil) - # list - Get queue items - # Get paginated list of items in a moderation queue with filtering options + # list - List queue items + # List the items of a review queue, with the filters and the date window of the queue applied. By default only pending items. The list is paginated. Use the item `id` to resolve or unresolve an item. url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( @@ -175,15 +175,14 @@ def list(request:, timeout_ms: nil, http_headers: nil) id: request.id, page: next_page, page_size: request.page_size, - sort_field: request.sort_field, - sort_direction: request.sort_direction, + sort: request.sort, + include_resolved: request.include_resolved, conversation_ids: request.conversation_ids, labels: request.labels, - after_date: request.after_date, - before_date: request.before_date, - include_resolved: request.include_resolved, author_id: request.author_id, filtered_action_ids: request.filtered_action_ids, + after_date: request.after_date, + before_date: request.before_date, project_id: request.project_id ), http_headers: http_headers @@ -366,7 +365,6 @@ def list(request:, timeout_ms: nil, http_headers: nil) sig { params( - body: Models::Operations::ResolveQueueItemRequestBody, id: ::String, item_id: ::String, project_id: T.nilable(::String), @@ -375,13 +373,12 @@ def list(request:, timeout_ms: nil, http_headers: nil) ) .returns(Models::Operations::ResolveQueueItemResponse) } - def resolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_headers: nil) + def resolve(id:, item_id:, project_id: nil, timeout_ms: nil, http_headers: nil) # resolve - Resolve a queue item - # Mark a queue item as resolved with a specific moderation action + # Mark an item of a queue as resolved. It is the same as a check-off in the dashboard: the item leaves the pending list and a QUEUE_ITEM_COMPLETED webhook is sent. To also take a moderation action, use `POST /actions/execute`. request = Models::Operations::ResolveQueueItemRequest.new( id: id, item_id: item_id, - body: body, project_id: project_id ) url, params = @sdk_configuration.get_server_details @@ -394,6 +391,268 @@ def resolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_headers ) headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "resolveQueueItem", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).post(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Operations::ResolveQueueItemResponseBody) + response = Models::Operations::ResolveQueueItemResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: T.unsafe(obj) + ) + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["403"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["500"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + + sig { + params( + body: Models::Operations::ResolveQueueItemsRequestBody, + id: ::String, + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::ResolveQueueItemsResponse) + } + def resolve_many(body:, id:, project_id: nil, timeout_ms: nil, http_headers: nil) + # resolve_many - Resolve queue items + # Mark up to 100 items of a queue as resolved in one request. Each item is resolved the same as with `POST /queue/{id}/items/{itemId}/resolve`. IDs that do not exist in the project are skipped and returned in `notFoundIds`. + request = Models::Operations::ResolveQueueItemsRequest.new( + id: id, + body: body, + project_id: project_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + Models::Operations::ResolveQueueItemsRequest, + base_url, + "/queue/{id}/items/resolve", + request + ) + headers = Utils.get_headers(request) + headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers["content-type"] = req_content_type raise StandardError, "request body is required" if data.nil? && form.nil? @@ -420,7 +679,7 @@ def resolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_headers config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, - operation_id: "resolveQueueItem", + operation_id: "resolveQueueItems", security_source: @sdk_configuration.security_source ) @@ -481,8 +740,8 @@ def resolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_headers response: http_response ) response_data = http_response.env.response_body - obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Operations::ResolveQueueItemResponseBody) - response = Models::Operations::ResolveQueueItemResponse.new( + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Operations::ResolveQueueItemsResponseBody) + response = Models::Operations::ResolveQueueItemsResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, @@ -643,7 +902,6 @@ def resolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_headers sig { params( - body: Models::Operations::UnresolveQueueItemRequestBody, id: ::String, item_id: ::String, project_id: T.nilable(::String), @@ -652,13 +910,12 @@ def resolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_headers ) .returns(Models::Operations::UnresolveQueueItemResponse) } - def unresolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_headers: nil) + def unresolve(id:, item_id:, project_id: nil, timeout_ms: nil, http_headers: nil) # unresolve - Unresolve a queue item - # Mark a previously resolved queue item as unresolved/pending + # Mark a resolved item of a queue as pending again. It is the same as removing a check-off in the dashboard: the item comes back in the pending list. request = Models::Operations::UnresolveQueueItemRequest.new( id: id, item_id: item_id, - body: body, project_id: project_id ) url, params = @sdk_configuration.get_server_details @@ -671,18 +928,6 @@ def unresolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_heade ) headers = Utils.get_headers(request) headers = T.cast(headers, T::Hash[String, String]) - req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) - headers["content-type"] = req_content_type - raise StandardError, "request body is required" if data.nil? && form.nil? - - if form && !form.empty? - body = Utils.encode_form(form) - elsif Utils.match_content_type(req_content_type, "application/x-www-form-urlencoded") - body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) - else - body = data - end - headers["Accept"] = "application/json" headers["user-agent"] = @sdk_configuration.user_agent @@ -706,7 +951,6 @@ def unresolve(body:, id:, item_id:, project_id: nil, timeout_ms: nil, http_heade begin http_response = T.must(connection).post(url) do |req| - req.body = body req.headers.merge!(headers) req.options.timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) diff --git a/lib/moderation_api/models/components.rb b/lib/moderation_api/models/components.rb index 843d63fd..a7677b4f 100644 --- a/lib/moderation_api/models/components.rb +++ b/lib/moderation_api/models/components.rb @@ -16,6 +16,7 @@ module Components autoload :Pagination, "moderation_api/models/components/pagination.rb" autoload :PermissionDeniedErrorCode, "moderation_api/models/components/permissiondeniederror_code.rb" autoload :Project, "moderation_api/models/components/project.rb" + autoload :ProjectApiKey, "moderation_api/models/components/projectapikey.rb" autoload :ProjectWithKey, "moderation_api/models/components/projectwithkey.rb" autoload( :ProjectWithKeyGlobalFlaggingMode, @@ -23,16 +24,35 @@ module Components ) autoload :ProjectGlobalFlaggingMode, "moderation_api/models/components/project_globalflaggingmode.rb" autoload :PublicAuthor, "moderation_api/models/components/publicauthor.rb" + autoload :PublicAuthorStatus, "moderation_api/models/components/publicauthor_status.rb" + autoload :Queue, "moderation_api/models/components/queue.rb" + autoload :QueueItem, "moderation_api/models/components/queueitem.rb" + autoload :QueueItemAudio, "moderation_api/models/components/queueitem_audio.rb" + autoload :QueueItemContentLeaf, "moderation_api/models/components/queueitem_content_leaf.rb" + autoload :QueueItemContentLeafAudio, "moderation_api/models/components/queueitem_content_leaf_audio.rb" + autoload :QueueItemContentLeafImage, "moderation_api/models/components/queueitem_content_leaf_image.rb" + autoload :QueueItemContentLeafText, "moderation_api/models/components/queueitem_content_leaf_text.rb" + autoload :QueueItemContentLeafVideo, "moderation_api/models/components/queueitem_content_leaf_video.rb" + autoload :QueueItemImage, "moderation_api/models/components/queueitem_image.rb" + autoload :QueueItemObject, "moderation_api/models/components/queueitem_object.rb" + autoload :QueueItemText, "moderation_api/models/components/queueitem_text.rb" + autoload :QueueItemVideo, "moderation_api/models/components/queueitem_video.rb" + autoload :QueueItemBrandImpersonation, "moderation_api/models/components/queueitem_brand_impersonation.rb" + autoload :QueueItemContent, "moderation_api/models/components/queueitem_content.rb" + autoload :QueueItemMatch, "moderation_api/models/components/queueitem_match.rb" + autoload :QueueItemSignals, "moderation_api/models/components/queueitem_signals.rb" + autoload :QueueItemStatus, "moderation_api/models/components/queueitem_status.rb" + autoload :QueueWithCounts, "moderation_api/models/components/queuewithcounts.rb" autoload :RateLimitErrorCode, "moderation_api/models/components/ratelimiterror_code.rb" autoload :Security, "moderation_api/models/components/security.rb" autoload :Block, "moderation_api/models/components/block.rb" autoload :ContentType, "moderation_api/models/components/contenttype.rb" autoload :FlaggingMode, "moderation_api/models/components/flaggingmode.rb" + autoload :Label, "moderation_api/models/components/label.rb" autoload :Metadata, "moderation_api/models/components/metadata.rb" autoload :Metrics, "moderation_api/models/components/metrics.rb" autoload :Path, "moderation_api/models/components/path.rb" autoload :RiskEvaluation, "moderation_api/models/components/risk_evaluation.rb" - autoload :Status, "moderation_api/models/components/status.rb" autoload :TranscriptionQuality, "moderation_api/models/components/transcriptionquality.rb" autoload :TrustLevel, "moderation_api/models/components/trust_level.rb" end diff --git a/lib/moderation_api/models/components/badrequesterror_code.rb b/lib/moderation_api/models/components/badrequesterror_code.rb index 0f3de809..896ed717 100644 --- a/lib/moderation_api/models/components/badrequesterror_code.rb +++ b/lib/moderation_api/models/components/badrequesterror_code.rb @@ -9,13 +9,15 @@ module Components # BadRequestErrorCode - Exactly what went wrong. Stable; safe to branch on. New codes may be added. # # - `invalid_request`: A parameter is invalid. `message` says which one. - # - `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project. + # - `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`. class BadRequestErrorCode include ::Crystalline::Enum enums do INVALID_REQUEST = new("invalid_request") PROJECT_ID_REQUIRED = new("project_id_required") + PROJECT_NAME_AMBIGUOUS = new("project_name_ambiguous") VALIDATION_FAILED = new("validation_failed") end diff --git a/lib/moderation_api/models/components/label.rb b/lib/moderation_api/models/components/label.rb new file mode 100644 index 00000000..aff5585b --- /dev/null +++ b/lib/moderation_api/models/components/label.rb @@ -0,0 +1,85 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + + class Label + extend T::Sig + include Crystalline::MetadataFields + + # The label name + field( + :label, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("label"), required: true}} + ) + # Confidence score between 0 and 1 + field( + :score, + ::Float, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("score"), required: true}} + ) + # True if the label was applied manually by a moderator + field( + :manual, + Crystalline::Nilable.new(Crystalline::Boolean.new), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("manual")}} + ) + # Whether this label crossed its flagging threshold + field( + :flagged, + Crystalline::Nilable.new(Crystalline::Boolean.new), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagged")}} + ) + # Whether this label crossed its threshold under a shadowed policy — reported for visibility, never counted toward a flagging decision + field( + :shadow_flagged, + Crystalline::Nilable.new(Crystalline::Boolean.new), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("shadow_flagged")}} + ) + + field( + :matches, + Crystalline::Nilable.new(Crystalline::Array.new(Models::Components::QueueItemMatch)), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("matches")}} + ) + + sig { + params( + label: ::String, + score: ::Float, + manual: T.nilable(T::Boolean), + flagged: T.nilable(T::Boolean), + shadow_flagged: T.nilable(T::Boolean), + matches: T.nilable(T::Array[Models::Components::QueueItemMatch]) + ) + .void + } + def initialize(label:, score:, manual: nil, flagged: nil, shadow_flagged: nil, matches: nil) + @label = label + @score = score + @manual = manual + @flagged = flagged + @shadow_flagged = shadow_flagged + @matches = matches + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @label == other.label + return false unless @score == other.score + return false unless @manual == other.manual + return false unless @flagged == other.flagged + return false unless @shadow_flagged == other.shadow_flagged + return false unless @matches == other.matches + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/label.rbi b/lib/moderation_api/models/components/label.rbi new file mode 100644 index 00000000..956d3152 --- /dev/null +++ b/lib/moderation_api/models/components/label.rbi @@ -0,0 +1,44 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::Label + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::Label + def label + end + + def label=(str_) + end + + def score + end + + def score=(str_) + end + + def manual + end + + def manual=(str_) + end + + def flagged + end + + def flagged=(str_) + end + + def shadow_flagged + end + + def shadow_flagged=(str_) + end + + def matches + end + + def matches=(str_) + end +end diff --git a/lib/moderation_api/models/components/notfounderror_code.rb b/lib/moderation_api/models/components/notfounderror_code.rb index 9e41ada5..65f6ff23 100644 --- a/lib/moderation_api/models/components/notfounderror_code.rb +++ b/lib/moderation_api/models/components/notfounderror_code.rb @@ -12,6 +12,7 @@ module Components # - `action_not_found`: The action does not exist. # - `author_not_found`: The author does not exist. # - `queue_not_found`: The review queue does not exist. + # - `queue_item_not_found`: The queue item does not exist in the project. # - `wordlist_not_found`: The wordlist does not exist. # - `webhook_not_found`: The webhook does not exist. # - `project_not_found`: The project does not exist. @@ -23,6 +24,7 @@ class NotFoundErrorCode ACTION_NOT_FOUND = new("action_not_found") AUTHOR_NOT_FOUND = new("author_not_found") QUEUE_NOT_FOUND = new("queue_not_found") + QUEUE_ITEM_NOT_FOUND = new("queue_item_not_found") WORDLIST_NOT_FOUND = new("wordlist_not_found") WEBHOOK_NOT_FOUND = new("webhook_not_found") PROJECT_NOT_FOUND = new("project_not_found") diff --git a/lib/moderation_api/models/components/projectapikey.rb b/lib/moderation_api/models/components/projectapikey.rb new file mode 100644 index 00000000..aab4e652 --- /dev/null +++ b/lib/moderation_api/models/components/projectapikey.rb @@ -0,0 +1,65 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + + class ProjectApiKey + extend T::Sig + include Crystalline::MetadataFields + + # The ID of the API key. + field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}} + # The key's name. + field( + :name, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} + ) + # The ID of the project the key belongs to. + field( + :project_id, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("projectId"), required: true}} + ) + # When the key was created. + field( + :created_at, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("createdAt"), required: true}} + ) + # The new secret API key. Use it to moderate content in this project. It is also shown in the project's settings. + field( + :secret_key, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("secretKey"), required: true}} + ) + + sig { + params(id: ::String, name: ::String, project_id: ::String, created_at: ::String, secret_key: ::String).void + } + def initialize(id:, name:, project_id:, created_at:, secret_key:) + @id = id + @name = name + @project_id = project_id + @created_at = created_at + @secret_key = secret_key + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @id == other.id + return false unless @name == other.name + return false unless @project_id == other.project_id + return false unless @created_at == other.created_at + return false unless @secret_key == other.secret_key + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/projectapikey.rbi b/lib/moderation_api/models/components/projectapikey.rbi new file mode 100644 index 00000000..a13133ac --- /dev/null +++ b/lib/moderation_api/models/components/projectapikey.rbi @@ -0,0 +1,38 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::ProjectApiKey + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::ProjectApiKey + def id + end + + def id=(str_) + end + + def name + end + + def name=(str_) + end + + def project_id + end + + def project_id=(str_) + end + + def created_at + end + + def created_at=(str_) + end + + def secret_key + end + + def secret_key=(str_) + end +end diff --git a/lib/moderation_api/models/components/publicauthor.rb b/lib/moderation_api/models/components/publicauthor.rb index 686f4766..9dc6164e 100644 --- a/lib/moderation_api/models/components/publicauthor.rb +++ b/lib/moderation_api/models/components/publicauthor.rb @@ -28,12 +28,12 @@ class PublicAuthor # Current author status field( :status, - Models::Components::Status, + Models::Components::PublicAuthorStatus, { 'format_json': { 'letter_case': ::ModerationApi::Utils.field_name("status"), required: true, - 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Components::Status, false) + 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Components::PublicAuthorStatus, false) } } ) @@ -115,7 +115,7 @@ class PublicAuthor id: ::String, first_seen: ::Float, last_seen: ::Float, - status: Models::Components::Status, + status: Models::Components::PublicAuthorStatus, trust_level: Models::Components::TrustLevel, metrics: Models::Components::Metrics, metadata: Models::Components::Metadata, diff --git a/lib/moderation_api/models/components/status.rb b/lib/moderation_api/models/components/publicauthor_status.rb similarity index 82% rename from lib/moderation_api/models/components/status.rb rename to lib/moderation_api/models/components/publicauthor_status.rb index d739f091..b828bee7 100644 --- a/lib/moderation_api/models/components/status.rb +++ b/lib/moderation_api/models/components/publicauthor_status.rb @@ -6,8 +6,8 @@ module ModerationApi module Models module Components - # Status - Current author status - class Status + # PublicAuthorStatus - Current author status + class PublicAuthorStatus include ::Crystalline::Enum enums do ENABLED = new("enabled") diff --git a/lib/moderation_api/models/components/publicauthor_status.rbi b/lib/moderation_api/models/components/publicauthor_status.rbi new file mode 100644 index 00000000..3a594a72 --- /dev/null +++ b/lib/moderation_api/models/components/publicauthor_status.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::PublicAuthorStatus + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::PublicAuthorStatus +end diff --git a/lib/moderation_api/models/components/queue.rb b/lib/moderation_api/models/components/queue.rb new file mode 100644 index 00000000..876ef5ae --- /dev/null +++ b/lib/moderation_api/models/components/queue.rb @@ -0,0 +1,55 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + + class Queue + extend T::Sig + include Crystalline::MetadataFields + + # The queue ID. + field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}} + # The queue name. + field( + :name, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} + ) + # Whether this is the default queue of the project. + field( + :is_default, + Crystalline::Boolean.new, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("isDefault"), required: true}} + ) + # The queue description. + field( + :description, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description"), required: true}} + ) + + sig { params(id: ::String, name: ::String, is_default: T::Boolean, description: T.nilable(::String)).void } + def initialize(id:, name:, is_default:, description: nil) + @id = id + @name = name + @is_default = is_default + @description = description + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @id == other.id + return false unless @name == other.name + return false unless @is_default == other.is_default + return false unless @description == other.description + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queue.rbi b/lib/moderation_api/models/components/queue.rbi new file mode 100644 index 00000000..da642189 --- /dev/null +++ b/lib/moderation_api/models/components/queue.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::Queue + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::Queue + def id + end + + def id=(str_) + end + + def name + end + + def name=(str_) + end + + def is_default + end + + def is_default=(str_) + end + + def description + end + + def description=(str_) + end +end diff --git a/lib/moderation_api/models/operations/listqueueitems_data.rb b/lib/moderation_api/models/components/queueitem.rb similarity index 54% rename from lib/moderation_api/models/operations/listqueueitems_data.rb rename to lib/moderation_api/models/components/queueitem.rb index 5b9083eb..cffe05c8 100644 --- a/lib/moderation_api/models/operations/listqueueitems_data.rb +++ b/lib/moderation_api/models/components/queueitem.rb @@ -5,120 +5,158 @@ module ModerationApi module Models - module Operations + module Components - class ListQueueItemsData + class QueueItem extend T::Sig include Crystalline::MetadataFields - # Content ID + # The item ID. Use it to resolve or unresolve the item in this queue. field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}} - # The content to be moderated + # Your content ID, as you sent it to `POST /moderate`. field( - :content, + :content_id, ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("content"), required: true}} + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("contentId"), required: true}} ) - + # The moderation labels of the content. field( :labels, - Crystalline::Array.new(Models::Operations::ListQueueItemsLabel), + Crystalline::Array.new(Models::Components::Label), {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("labels"), required: true}} ) - # Whether the item is flagged by any label + # Whether moderation flagged the content. field( :flagged, Crystalline::Boolean.new, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagged"), required: true}} ) - # Status of the item + # `pending` waits for review. `resolved` is reviewed. field( :status, - Models::Operations::ListQueueItemsStatus, + Models::Components::QueueItemStatus, { 'format_json': { 'letter_case': ::ModerationApi::Utils.field_name("status"), required: true, - 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::ListQueueItemsStatus, false) + 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Components::QueueItemStatus, false) } } ) - # Unix timestamp of when the item was created + # When the content was submitted, as Unix time in milliseconds. field( :timestamp, ::Float, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("timestamp"), required: true}} ) - # Content language + # The submitted content. + field( + :content, + Crystalline::Nilable.new( + Crystalline::DiscriminatedUnion.new( + "type", + { + "text" => Models::Components::QueueItemText, + "image" => Models::Components::QueueItemImage, + "video" => Models::Components::QueueItemVideo, + "audio" => Models::Components::QueueItemAudio, + "object" => Models::Components::QueueItemObject + } + ) + ), + { + 'format_json': {'letter_case': ::ModerationApi::Utils.field_name("content"), required: true}, + 'discriminator': "type", + 'discriminator_mapping': { + "text" => Models::Components::QueueItemText, + "image" => Models::Components::QueueItemImage, + "video" => Models::Components::QueueItemVideo, + "audio" => Models::Components::QueueItemAudio, + "object" => Models::Components::QueueItemObject + } + } + ) + # Severity score from 0 to 1, if available. + field( + :severity, + Crystalline::Nilable.new(::Float), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("severity"), required: true}} + ) + # Detected ISO language code. field( :language, Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("language")}} + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("language"), required: true}} ) - # Conversation ID + # Conversation ID, if any. field( :conversation_id, Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("conversationId")}} + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("conversationId"), required: true}} ) - # Author ID + # Your author ID, if any. field( :author_id, Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authorId")}} - ) - # Action IDs taken on this item - field( - :actions, - Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::ListQueueItemsAction)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("actions")}} + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authorId"), required: true}} ) - # Type of the content object + # Content type, for example `message` or `profile`. field( :content_type, Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("contentType")}} + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("contentType"), required: true}} ) sig { params( id: ::String, - content: ::String, - labels: T::Array[Models::Operations::ListQueueItemsLabel], + content_id: ::String, + labels: T::Array[Models::Components::Label], flagged: T::Boolean, - status: Models::Operations::ListQueueItemsStatus, + status: Models::Components::QueueItemStatus, timestamp: ::Float, + content: T.nilable( + T.any( + Models::Components::QueueItemText, + Models::Components::QueueItemImage, + Models::Components::QueueItemVideo, + Models::Components::QueueItemAudio, + Models::Components::QueueItemObject + ) + ), + severity: T.nilable(::Float), language: T.nilable(::String), conversation_id: T.nilable(::String), author_id: T.nilable(::String), - actions: T.nilable(T::Array[Models::Operations::ListQueueItemsAction]), content_type: T.nilable(::String) ) .void } def initialize( id:, - content:, + content_id:, labels:, flagged:, status:, timestamp:, + content: nil, + severity: nil, language: nil, conversation_id: nil, author_id: nil, - actions: nil, content_type: nil ) @id = id - @content = content + @content_id = content_id @labels = labels @flagged = flagged @status = status @timestamp = timestamp + @content = content + @severity = severity @language = language @conversation_id = conversation_id @author_id = author_id - @actions = actions @content_type = content_type end @@ -126,15 +164,16 @@ def initialize( def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id - return false unless @content == other.content + return false unless @content_id == other.content_id return false unless @labels == other.labels return false unless @flagged == other.flagged return false unless @status == other.status return false unless @timestamp == other.timestamp + return false unless @content == other.content + return false unless @severity == other.severity return false unless @language == other.language return false unless @conversation_id == other.conversation_id return false unless @author_id == other.author_id - return false unless @actions == other.actions return false unless @content_type == other.content_type true end diff --git a/lib/moderation_api/models/operations/listqueueitems_data.rbi b/lib/moderation_api/models/components/queueitem.rbi similarity index 76% rename from lib/moderation_api/models/operations/listqueueitems_data.rbi rename to lib/moderation_api/models/components/queueitem.rbi index 4a0f8f1b..1a11d962 100644 --- a/lib/moderation_api/models/operations/listqueueitems_data.rbi +++ b/lib/moderation_api/models/components/queueitem.rbi @@ -1,21 +1,21 @@ # typed: true # frozen_string_literal: true -class ModerationApi::Models::Operations::ListQueueItemsData +class ModerationApi::Models::Components::QueueItem extend ::Crystalline::MetadataFields::ClassMethods end -class ModerationApi::Models::Operations::ListQueueItemsData +class ModerationApi::Models::Components::QueueItem def id end def id=(str_) end - def content + def content_id end - def content=(str_) + def content_id=(str_) end def labels @@ -42,6 +42,18 @@ class ModerationApi::Models::Operations::ListQueueItemsData def timestamp=(str_) end + def content + end + + def content=(str_) + end + + def severity + end + + def severity=(str_) + end + def language end @@ -60,12 +72,6 @@ class ModerationApi::Models::Operations::ListQueueItemsData def author_id=(str_) end - def actions - end - - def actions=(str_) - end - def content_type end diff --git a/lib/moderation_api/models/components/queueitem_audio.rb b/lib/moderation_api/models/components/queueitem_audio.rb new file mode 100644 index 00000000..d128e23c --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_audio.rb @@ -0,0 +1,43 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + # Audio + class QueueItemAudio + extend T::Sig + include Crystalline::MetadataFields + + # The URL of the audio content + field :url, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("url"), required: true}} + + field( + :type, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("type"), required: true}} + ) + + sig { params(url: ::String, type: ::String).void } + def initialize(url:, type: "audio") + @url = url + unless type == "audio" + raise ArgumentError, "Invalid value for type" + end + + @type = "audio" + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @url == other.url + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_audio.rbi b/lib/moderation_api/models/components/queueitem_audio.rbi new file mode 100644 index 00000000..e4ba3d84 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_audio.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemAudio + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemAudio + def url + end + + def url=(str_) + end + + def type + end + + def type=(str_) + end +end diff --git a/lib/moderation_api/models/components/queueitem_brand_impersonation.rb b/lib/moderation_api/models/components/queueitem_brand_impersonation.rb new file mode 100644 index 00000000..6166b218 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_brand_impersonation.rb @@ -0,0 +1,42 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + + class QueueItemBrandImpersonation + extend T::Sig + include Crystalline::MetadataFields + + field( + :brand, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("brand"), required: true}} + ) + + field( + :method, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("method"), required: true}} + ) + + sig { params(brand: ::String, method: ::String).void } + def initialize(brand:, method:) + @brand = brand + @method = method + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @brand == other.brand + return false unless @method == other.method + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_brand_impersonation.rbi b/lib/moderation_api/models/components/queueitem_brand_impersonation.rbi new file mode 100644 index 00000000..0ad74c3e --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_brand_impersonation.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemBrandImpersonation + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemBrandImpersonation + def brand + end + + def brand=(str_) + end + + def method + end + + def method=(str_) + end +end diff --git a/lib/moderation_api/models/components/queueitem_content.rb b/lib/moderation_api/models/components/queueitem_content.rb new file mode 100644 index 00000000..44f4d5dc --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content.rb @@ -0,0 +1,25 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + + class QueueItemContent + extend T::Sig + include Crystalline::MetadataFields + + def initialize + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_content.rbi b/lib/moderation_api/models/components/queueitem_content.rbi new file mode 100644 index 00000000..10518574 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemContent + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemContent +end diff --git a/lib/moderation_api/models/components/queueitem_content_leaf.rb b/lib/moderation_api/models/components/queueitem_content_leaf.rb new file mode 100644 index 00000000..f5052444 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content_leaf.rb @@ -0,0 +1,25 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + + class QueueItemContentLeaf + extend T::Sig + include Crystalline::MetadataFields + + def initialize + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_content_leaf.rbi b/lib/moderation_api/models/components/queueitem_content_leaf.rbi new file mode 100644 index 00000000..7d07a616 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content_leaf.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemContentLeaf + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemContentLeaf +end diff --git a/lib/moderation_api/models/components/queueitem_content_leaf_audio.rb b/lib/moderation_api/models/components/queueitem_content_leaf_audio.rb new file mode 100644 index 00000000..4d017799 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content_leaf_audio.rb @@ -0,0 +1,43 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + # Audio + class QueueItemContentLeafAudio + extend T::Sig + include Crystalline::MetadataFields + + # The URL of the audio content + field :url, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("url"), required: true}} + + field( + :type, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("type"), required: true}} + ) + + sig { params(url: ::String, type: ::String).void } + def initialize(url:, type: "audio") + @url = url + unless type == "audio" + raise ArgumentError, "Invalid value for type" + end + + @type = "audio" + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @url == other.url + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_content_leaf_audio.rbi b/lib/moderation_api/models/components/queueitem_content_leaf_audio.rbi new file mode 100644 index 00000000..dd5f0515 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content_leaf_audio.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemContentLeafAudio + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemContentLeafAudio + def url + end + + def url=(str_) + end + + def type + end + + def type=(str_) + end +end diff --git a/lib/moderation_api/models/components/queueitem_content_leaf_image.rb b/lib/moderation_api/models/components/queueitem_content_leaf_image.rb new file mode 100644 index 00000000..f0f4b268 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content_leaf_image.rb @@ -0,0 +1,54 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + # Image + class QueueItemContentLeafImage + extend T::Sig + include Crystalline::MetadataFields + + field( + :type, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("type"), required: true}} + ) + # A public URL of the image content. Either url or data must be provided. + field( + :url, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("url")}} + ) + # Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue. + field( + :data, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("data")}} + ) + + sig { params(type: ::String, url: T.nilable(::String), data: T.nilable(::String)).void } + def initialize(type: "image", url: nil, data: nil) + unless type == "image" + raise ArgumentError, "Invalid value for type" + end + + @type = "image" + @url = url + @data = data + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @type == other.type + return false unless @url == other.url + return false unless @data == other.data + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_content_leaf_image.rbi b/lib/moderation_api/models/components/queueitem_content_leaf_image.rbi new file mode 100644 index 00000000..3d6580bc --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content_leaf_image.rbi @@ -0,0 +1,26 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemContentLeafImage + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemContentLeafImage + def type + end + + def type=(str_) + end + + def url + end + + def url=(str_) + end + + def data + end + + def data=(str_) + end +end diff --git a/lib/moderation_api/models/components/queueitem_content_leaf_text.rb b/lib/moderation_api/models/components/queueitem_content_leaf_text.rb new file mode 100644 index 00000000..2e75d317 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content_leaf_text.rb @@ -0,0 +1,47 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + # Text + class QueueItemContentLeafText + extend T::Sig + include Crystalline::MetadataFields + + # The content text + field( + :text, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("text"), required: true}} + ) + + field( + :type, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("type"), required: true}} + ) + + sig { params(text: ::String, type: ::String).void } + def initialize(text:, type: "text") + @text = text + unless type == "text" + raise ArgumentError, "Invalid value for type" + end + + @type = "text" + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @text == other.text + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_content_leaf_text.rbi b/lib/moderation_api/models/components/queueitem_content_leaf_text.rbi new file mode 100644 index 00000000..d4f9535e --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content_leaf_text.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemContentLeafText + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemContentLeafText + def text + end + + def text=(str_) + end + + def type + end + + def type=(str_) + end +end diff --git a/lib/moderation_api/models/components/queueitem_content_leaf_video.rb b/lib/moderation_api/models/components/queueitem_content_leaf_video.rb new file mode 100644 index 00000000..4f1813e3 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content_leaf_video.rb @@ -0,0 +1,43 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + # Video + class QueueItemContentLeafVideo + extend T::Sig + include Crystalline::MetadataFields + + # A public URL of the video content + field :url, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("url"), required: true}} + + field( + :type, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("type"), required: true}} + ) + + sig { params(url: ::String, type: ::String).void } + def initialize(url:, type: "video") + @url = url + unless type == "video" + raise ArgumentError, "Invalid value for type" + end + + @type = "video" + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @url == other.url + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_content_leaf_video.rbi b/lib/moderation_api/models/components/queueitem_content_leaf_video.rbi new file mode 100644 index 00000000..d9dd5591 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_content_leaf_video.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemContentLeafVideo + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemContentLeafVideo + def url + end + + def url=(str_) + end + + def type + end + + def type=(str_) + end +end diff --git a/lib/moderation_api/models/components/queueitem_image.rb b/lib/moderation_api/models/components/queueitem_image.rb new file mode 100644 index 00000000..6255cd62 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_image.rb @@ -0,0 +1,54 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + # Image + class QueueItemImage + extend T::Sig + include Crystalline::MetadataFields + + field( + :type, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("type"), required: true}} + ) + # A public URL of the image content. Either url or data must be provided. + field( + :url, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("url")}} + ) + # Base64-encoded image data. Either url or data must be provided. Note: base64 images are not stored and will not appear in the review queue. + field( + :data, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("data")}} + ) + + sig { params(type: ::String, url: T.nilable(::String), data: T.nilable(::String)).void } + def initialize(type: "image", url: nil, data: nil) + unless type == "image" + raise ArgumentError, "Invalid value for type" + end + + @type = "image" + @url = url + @data = data + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @type == other.type + return false unless @url == other.url + return false unless @data == other.data + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_image.rbi b/lib/moderation_api/models/components/queueitem_image.rbi new file mode 100644 index 00000000..be430b62 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_image.rbi @@ -0,0 +1,26 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemImage + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemImage + def type + end + + def type=(str_) + end + + def url + end + + def url=(str_) + end + + def data + end + + def data=(str_) + end +end diff --git a/lib/moderation_api/models/components/queueitem_match.rb b/lib/moderation_api/models/components/queueitem_match.rb new file mode 100644 index 00000000..027e2705 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_match.rb @@ -0,0 +1,122 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + + class QueueItemMatch + extend T::Sig + include Crystalline::MetadataFields + + # The matched substring + field( + :match, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("match"), required: true}} + ) + # Match confidence between 0 and 1 + field( + :probability, + ::Float, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("probability"), required: true}} + ) + # [start, end] character offsets in the source text + field( + :span, + Crystalline::Array.new(::Float), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("span"), required: true}} + ) + + field( + :reasons, + Crystalline::Nilable.new(Crystalline::Array.new(::String)), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("reasons")}} + ) + + field( + :signals, + Crystalline::Nilable.new(Models::Components::QueueItemSignals), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("signals")}} + ) + + field( + :entity_type, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("entity_type")}} + ) + + field( + :scripts, + Crystalline::Nilable.new(Crystalline::Array.new(::String)), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("scripts")}} + ) + + field( + :skeleton, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("skeleton")}} + ) + + field( + :mask, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("mask")}} + ) + + sig { + params( + match: ::String, + probability: ::Float, + span: T::Array[::Float], + reasons: T.nilable(T::Array[::String]), + signals: T.nilable(Models::Components::QueueItemSignals), + entity_type: T.nilable(::String), + scripts: T.nilable(T::Array[::String]), + skeleton: T.nilable(::String), + mask: T.nilable(::String) + ) + .void + } + def initialize( + match:, + probability:, + span:, + reasons: nil, + signals: nil, + entity_type: nil, + scripts: nil, + skeleton: nil, + mask: nil + ) + @match = match + @probability = probability + @span = span + @reasons = reasons + @signals = signals + @entity_type = entity_type + @scripts = scripts + @skeleton = skeleton + @mask = mask + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @match == other.match + return false unless @probability == other.probability + return false unless @span == other.span + return false unless @reasons == other.reasons + return false unless @signals == other.signals + return false unless @entity_type == other.entity_type + return false unless @scripts == other.scripts + return false unless @skeleton == other.skeleton + return false unless @mask == other.mask + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_match.rbi b/lib/moderation_api/models/components/queueitem_match.rbi new file mode 100644 index 00000000..76162ee2 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_match.rbi @@ -0,0 +1,62 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemMatch + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemMatch + def match + end + + def match=(str_) + end + + def probability + end + + def probability=(str_) + end + + def span + end + + def span=(str_) + end + + def reasons + end + + def reasons=(str_) + end + + def signals + end + + def signals=(str_) + end + + def entity_type + end + + def entity_type=(str_) + end + + def scripts + end + + def scripts=(str_) + end + + def skeleton + end + + def skeleton=(str_) + end + + def mask + end + + def mask=(str_) + end +end diff --git a/lib/moderation_api/models/components/queueitem_object.rb b/lib/moderation_api/models/components/queueitem_object.rb new file mode 100644 index 00000000..2e4c34da --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_object.rb @@ -0,0 +1,72 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + # Object + class QueueItemObject + extend T::Sig + include Crystalline::MetadataFields + + # Values in the object. Can be mixed content types. + field( + :data, + Crystalline::Hash.new( + Symbol, + Crystalline::DiscriminatedUnion.new( + "type", + { + "text" => Models::Components::QueueItemContentLeafText, + "image" => Models::Components::QueueItemContentLeafImage, + "video" => Models::Components::QueueItemContentLeafVideo, + "audio" => Models::Components::QueueItemContentLeafAudio + } + ) + ), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("data"), required: true}} + ) + + field( + :type, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("type"), required: true}} + ) + + sig { + params( + data: T::Hash[ + Symbol, + T.any( + Models::Components::QueueItemContentLeafText, + Models::Components::QueueItemContentLeafImage, + Models::Components::QueueItemContentLeafVideo, + Models::Components::QueueItemContentLeafAudio + ) + ], + type: ::String + ) + .void + } + def initialize(data:, type: "object") + @data = data + unless type == "object" + raise ArgumentError, "Invalid value for type" + end + + @type = "object" + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @data == other.data + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_object.rbi b/lib/moderation_api/models/components/queueitem_object.rbi new file mode 100644 index 00000000..12247f82 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_object.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemObject + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemObject + def data + end + + def data=(str_) + end + + def type + end + + def type=(str_) + end +end diff --git a/lib/moderation_api/models/components/queueitem_signals.rb b/lib/moderation_api/models/components/queueitem_signals.rb new file mode 100644 index 00000000..ba0618ba --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_signals.rb @@ -0,0 +1,126 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + + class QueueItemSignals + extend T::Sig + include Crystalline::MetadataFields + + field( + :has_suspicious_characters, + Crystalline::Boolean.new, + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("has_suspicious_characters"), + required: true + } + } + ) + + field( + :is_link_shortener, + Crystalline::Boolean.new, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("is_link_shortener"), required: true}} + ) + + field( + :is_reported, + Crystalline::Boolean.new, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("is_reported"), required: true}} + ) + + field( + :brand_impersonation, + Crystalline::Nilable.new(Models::Components::QueueItemBrandImpersonation), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("brand_impersonation"), required: true}} + ) + + field( + :domain_age_days, + Crystalline::Nilable.new(::Float), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("domain_age_days"), required: true}} + ) + + field( + :has_email_setup, + Crystalline::Nilable.new(Crystalline::Boolean.new), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("has_email_setup"), required: true}} + ) + + field( + :redirect_count, + Crystalline::Nilable.new(::Float), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("redirect_count"), required: true}} + ) + + field( + :final_url, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("final_url"), required: true}} + ) + + field( + :bot_protection, + Crystalline::Nilable.new(Crystalline::Boolean.new), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("bot_protection"), required: true}} + ) + + sig { + params( + has_suspicious_characters: T::Boolean, + is_link_shortener: T::Boolean, + is_reported: T::Boolean, + brand_impersonation: T.nilable(Models::Components::QueueItemBrandImpersonation), + domain_age_days: T.nilable(::Float), + has_email_setup: T.nilable(T::Boolean), + redirect_count: T.nilable(::Float), + final_url: T.nilable(::String), + bot_protection: T.nilable(T::Boolean) + ) + .void + } + def initialize( + has_suspicious_characters:, + is_link_shortener:, + is_reported:, + brand_impersonation: nil, + domain_age_days: nil, + has_email_setup: nil, + redirect_count: nil, + final_url: nil, + bot_protection: nil + ) + @has_suspicious_characters = has_suspicious_characters + @is_link_shortener = is_link_shortener + @is_reported = is_reported + @brand_impersonation = brand_impersonation + @domain_age_days = domain_age_days + @has_email_setup = has_email_setup + @redirect_count = redirect_count + @final_url = final_url + @bot_protection = bot_protection + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @has_suspicious_characters == other.has_suspicious_characters + return false unless @is_link_shortener == other.is_link_shortener + return false unless @is_reported == other.is_reported + return false unless @brand_impersonation == other.brand_impersonation + return false unless @domain_age_days == other.domain_age_days + return false unless @has_email_setup == other.has_email_setup + return false unless @redirect_count == other.redirect_count + return false unless @final_url == other.final_url + return false unless @bot_protection == other.bot_protection + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_signals.rbi b/lib/moderation_api/models/components/queueitem_signals.rbi new file mode 100644 index 00000000..041683ee --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_signals.rbi @@ -0,0 +1,62 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemSignals + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemSignals + def has_suspicious_characters + end + + def has_suspicious_characters=(str_) + end + + def is_link_shortener + end + + def is_link_shortener=(str_) + end + + def is_reported + end + + def is_reported=(str_) + end + + def brand_impersonation + end + + def brand_impersonation=(str_) + end + + def domain_age_days + end + + def domain_age_days=(str_) + end + + def has_email_setup + end + + def has_email_setup=(str_) + end + + def redirect_count + end + + def redirect_count=(str_) + end + + def final_url + end + + def final_url=(str_) + end + + def bot_protection + end + + def bot_protection=(str_) + end +end diff --git a/lib/moderation_api/models/operations/casebookagreement.rb b/lib/moderation_api/models/components/queueitem_status.rb similarity index 56% rename from lib/moderation_api/models/operations/casebookagreement.rb rename to lib/moderation_api/models/components/queueitem_status.rb index 65d631a5..bdefec36 100644 --- a/lib/moderation_api/models/operations/casebookagreement.rb +++ b/lib/moderation_api/models/components/queueitem_status.rb @@ -5,14 +5,13 @@ module ModerationApi module Models - module Operations - - class CasebookAgreement + module Components + # QueueItemStatus - `pending` waits for review. `resolved` is reviewed. + class QueueItemStatus include ::Crystalline::Enum enums do - ALL = new("ALL") - OVERRULED = new("OVERRULED") - AGREED = new("AGREED") + PENDING = new("pending") + RESOLVED = new("resolved") end open! diff --git a/lib/moderation_api/models/components/queueitem_status.rbi b/lib/moderation_api/models/components/queueitem_status.rbi new file mode 100644 index 00000000..8ea3e966 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_status.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemStatus + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemStatus +end diff --git a/lib/moderation_api/models/components/queueitem_text.rb b/lib/moderation_api/models/components/queueitem_text.rb new file mode 100644 index 00000000..5a1b62fa --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_text.rb @@ -0,0 +1,47 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + # Text + class QueueItemText + extend T::Sig + include Crystalline::MetadataFields + + # The content text + field( + :text, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("text"), required: true}} + ) + + field( + :type, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("type"), required: true}} + ) + + sig { params(text: ::String, type: ::String).void } + def initialize(text:, type: "text") + @text = text + unless type == "text" + raise ArgumentError, "Invalid value for type" + end + + @type = "text" + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @text == other.text + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_text.rbi b/lib/moderation_api/models/components/queueitem_text.rbi new file mode 100644 index 00000000..4e314440 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_text.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemText + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemText + def text + end + + def text=(str_) + end + + def type + end + + def type=(str_) + end +end diff --git a/lib/moderation_api/models/components/queueitem_video.rb b/lib/moderation_api/models/components/queueitem_video.rb new file mode 100644 index 00000000..faa90ddc --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_video.rb @@ -0,0 +1,43 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Components + # Video + class QueueItemVideo + extend T::Sig + include Crystalline::MetadataFields + + # A public URL of the video content + field :url, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("url"), required: true}} + + field( + :type, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("type"), required: true}} + ) + + sig { params(url: ::String, type: ::String).void } + def initialize(url:, type: "video") + @url = url + unless type == "video" + raise ArgumentError, "Invalid value for type" + end + + @type = "video" + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @url == other.url + return false unless @type == other.type + true + end + end + end + end +end diff --git a/lib/moderation_api/models/components/queueitem_video.rbi b/lib/moderation_api/models/components/queueitem_video.rbi new file mode 100644 index 00000000..0d203b28 --- /dev/null +++ b/lib/moderation_api/models/components/queueitem_video.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Components::QueueItemVideo + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Components::QueueItemVideo + def url + end + + def url=(str_) + end + + def type + end + + def type=(str_) + end +end diff --git a/lib/moderation_api/models/operations/queue.rb b/lib/moderation_api/models/components/queuewithcounts.rb similarity index 71% rename from lib/moderation_api/models/operations/queue.rb rename to lib/moderation_api/models/components/queuewithcounts.rb index 3bf317aa..fd3f5a07 100644 --- a/lib/moderation_api/models/operations/queue.rb +++ b/lib/moderation_api/models/components/queuewithcounts.rb @@ -5,78 +5,79 @@ module ModerationApi module Models - module Operations + module Components - class Queue + class QueueWithCounts extend T::Sig include Crystalline::MetadataFields + # The queue ID. field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}} - + # The queue name. field( :name, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} ) - - field( - :description, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description"), required: true}} - ) - + # Whether this is the default queue of the project. field( - :filter, - Models::Operations::Filter, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("filter"), required: true}} + :is_default, + Crystalline::Boolean.new, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("isDefault"), required: true}} ) - + # Number of items that wait for review. field( :unresolved_items_count, - ::Float, + ::Integer, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("unresolvedItemsCount"), required: true}} ) - + # Number of items that are resolved. field( :resolved_items_count, - ::Float, + ::Integer, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("resolvedItemsCount"), required: true}} ) - + # Number of items in the queue, resolved and unresolved. field( :total_items_count, - ::Float, + ::Integer, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("totalItemsCount"), required: true}} ) + # The queue description. + field( + :description, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description"), required: true}} + ) sig { params( id: ::String, name: ::String, - description: ::String, - filter: Models::Operations::Filter, - unresolved_items_count: ::Float, - resolved_items_count: ::Float, - total_items_count: ::Float + is_default: T::Boolean, + unresolved_items_count: ::Integer, + resolved_items_count: ::Integer, + total_items_count: ::Integer, + description: T.nilable(::String) ) .void } def initialize( id:, name:, - description:, - filter:, + is_default:, unresolved_items_count:, resolved_items_count:, - total_items_count: + total_items_count:, + description: nil ) @id = id @name = name - @description = description - @filter = filter + @is_default = is_default @unresolved_items_count = unresolved_items_count @resolved_items_count = resolved_items_count @total_items_count = total_items_count + @description = description end sig { params(other: T.untyped).returns(T::Boolean) } @@ -84,11 +85,11 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @name == other.name - return false unless @description == other.description - return false unless @filter == other.filter + return false unless @is_default == other.is_default return false unless @unresolved_items_count == other.unresolved_items_count return false unless @resolved_items_count == other.resolved_items_count return false unless @total_items_count == other.total_items_count + return false unless @description == other.description true end end diff --git a/lib/moderation_api/models/operations/queue.rbi b/lib/moderation_api/models/components/queuewithcounts.rbi similarity index 75% rename from lib/moderation_api/models/operations/queue.rbi rename to lib/moderation_api/models/components/queuewithcounts.rbi index d0937db1..b5139a13 100644 --- a/lib/moderation_api/models/operations/queue.rbi +++ b/lib/moderation_api/models/components/queuewithcounts.rbi @@ -1,11 +1,11 @@ # typed: true # frozen_string_literal: true -class ModerationApi::Models::Operations::Queue +class ModerationApi::Models::Components::QueueWithCounts extend ::Crystalline::MetadataFields::ClassMethods end -class ModerationApi::Models::Operations::Queue +class ModerationApi::Models::Components::QueueWithCounts def id end @@ -18,16 +18,10 @@ class ModerationApi::Models::Operations::Queue def name=(str_) end - def description - end - - def description=(str_) - end - - def filter + def is_default end - def filter=(str_) + def is_default=(str_) end def unresolved_items_count @@ -47,4 +41,10 @@ class ModerationApi::Models::Operations::Queue def total_items_count=(str_) end + + def description + end + + def description=(str_) + end end diff --git a/lib/moderation_api/models/errors/badrequesterror.rb b/lib/moderation_api/models/errors/badrequesterror.rb index 8011158b..f729cd97 100644 --- a/lib/moderation_api/models/errors/badrequesterror.rb +++ b/lib/moderation_api/models/errors/badrequesterror.rb @@ -14,7 +14,8 @@ class BadRequestError < StandardError # Exactly what went wrong. Stable; safe to branch on. New codes may be added. # # - `invalid_request`: A parameter is invalid. `message` says which one. - # - `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project. + # - `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`. field( :code, diff --git a/lib/moderation_api/models/errors/notfounderror.rb b/lib/moderation_api/models/errors/notfounderror.rb index 45057c8e..c06f3a4e 100644 --- a/lib/moderation_api/models/errors/notfounderror.rb +++ b/lib/moderation_api/models/errors/notfounderror.rb @@ -17,6 +17,7 @@ class NotFoundError < StandardError # - `action_not_found`: The action does not exist. # - `author_not_found`: The author does not exist. # - `queue_not_found`: The review queue does not exist. + # - `queue_item_not_found`: The queue item does not exist in the project. # - `wordlist_not_found`: The wordlist does not exist. # - `webhook_not_found`: The webhook does not exist. # - `project_not_found`: The project does not exist. diff --git a/lib/moderation_api/models/operations.rb b/lib/moderation_api/models/operations.rb index 0e733276..d091799f 100644 --- a/lib/moderation_api/models/operations.rb +++ b/lib/moderation_api/models/operations.rb @@ -65,21 +65,19 @@ module Operations autoload :VideoResponse, "moderation_api/models/operations/video_response.rb" autoload :Violence, "moderation_api/models/operations/violence.rb" autoload :Weapons, "moderation_api/models/operations/weapons.rb" - autoload :ActionStat, "moderation_api/models/operations/actionstat.rb" autoload :ActionRequest, "moderation_api/models/operations/action_request.rb" + autoload :ActionResponse, "moderation_api/models/operations/action_response.rb" autoload :AddWordlistWordsRequestBody, "moderation_api/models/operations/addwordlistwords_requestbody.rb" autoload :AddWordlistWordsResponseBody, "moderation_api/models/operations/addwordlistwords_responsebody.rb" autoload :AddWordlistWordsRequest, "moderation_api/models/operations/addwordlistwords_request.rb" autoload :AddWordlistWordsResponse, "moderation_api/models/operations/addwordlistwords_response.rb" - autoload :Author, "moderation_api/models/operations/author.rb" autoload :AuthorStatus, "moderation_api/models/operations/author_status.rb" autoload :Behavior, "moderation_api/models/operations/behavior.rb" autoload :Block, "moderation_api/models/operations/block.rb" autoload :BrandImpersonation, "moderation_api/models/operations/brand_impersonation.rb" + autoload :Bucket, "moderation_api/models/operations/bucket.rb" autoload :Casebook, "moderation_api/models/operations/casebook.rb" - autoload :CasebookAgreement, "moderation_api/models/operations/casebookagreement.rb" - autoload :CasebookAnswer, "moderation_api/models/operations/casebookanswer.rb" - autoload :CheckStatus, "moderation_api/models/operations/checkstatus.rb" + autoload :Channel, "moderation_api/models/operations/channel.rb" autoload :ClientAction, "moderation_api/models/operations/clientaction.rb" autoload :Comparator, "moderation_api/models/operations/comparator.rb" autoload :ContentRequest, "moderation_api/models/operations/content_request.rb" @@ -116,6 +114,14 @@ module Operations autoload :CreateChannelContentType, "moderation_api/models/operations/createchannel_contenttype.rb" autoload :CreateChannelRequest, "moderation_api/models/operations/createchannel_request.rb" autoload :CreateChannelResponse, "moderation_api/models/operations/createchannel_response.rb" + autoload :CreateFeedbackRequestBody, "moderation_api/models/operations/createfeedback_requestbody.rb" + autoload :CreateFeedbackResponseBody, "moderation_api/models/operations/createfeedback_responsebody.rb" + autoload :CreateFeedbackRequest, "moderation_api/models/operations/createfeedback_request.rb" + autoload :CreateFeedbackResponse, "moderation_api/models/operations/createfeedback_response.rb" + autoload :CreateFeedbackType, "moderation_api/models/operations/createfeedback_type.rb" + autoload :CreateProjectApiKeyRequestBody, "moderation_api/models/operations/createprojectapikey_requestbody.rb" + autoload :CreateProjectApiKeyRequest, "moderation_api/models/operations/createprojectapikey_request.rb" + autoload :CreateProjectApiKeyResponse, "moderation_api/models/operations/createprojectapikey_response.rb" autoload :CreateProjectRequest, "moderation_api/models/operations/createproject_request.rb" autoload :CreateProjectResponse, "moderation_api/models/operations/createproject_response.rb" autoload :CreateWebhookRequestBody, "moderation_api/models/operations/createwebhook_requestbody.rb" @@ -125,6 +131,10 @@ module Operations autoload :CreateWebhookPayloadVersion, "moderation_api/models/operations/createwebhook_payloadversion.rb" autoload :CreateWebhookRequest, "moderation_api/models/operations/createwebhook_request.rb" autoload :CreateWebhookResponse, "moderation_api/models/operations/createwebhook_response.rb" + autoload :CreateWordlistRequestBody, "moderation_api/models/operations/createwordlist_requestbody.rb" + autoload :CreateWordlistResponseBody, "moderation_api/models/operations/createwordlist_responsebody.rb" + autoload :CreateWordlistRequest, "moderation_api/models/operations/createwordlist_request.rb" + autoload :CreateWordlistResponse, "moderation_api/models/operations/createwordlist_response.rb" autoload :CurrentProject, "moderation_api/models/operations/current_project.rb" autoload :DailyReviewCount, "moderation_api/models/operations/dailyreviewcount.rb" autoload :DataAudio, "moderation_api/models/operations/data_audio.rb" @@ -160,9 +170,7 @@ module Operations autoload :ExecuteActionResponseBody, "moderation_api/models/operations/executeaction_responsebody.rb" autoload :ExecuteActionRequest, "moderation_api/models/operations/executeaction_request.rb" autoload :ExecuteActionResponse, "moderation_api/models/operations/executeaction_response.rb" - autoload :Filter, "moderation_api/models/operations/filter.rb" - autoload :FilterLabel, "moderation_api/models/operations/filterlabel.rb" - autoload :FlaggedContentTrend, "moderation_api/models/operations/flaggedcontenttrend.rb" + autoload :FlagRateSpike, "moderation_api/models/operations/flagratespike.rb" autoload :FlaggingMode, "moderation_api/models/operations/flaggingmode.rb" autoload :GetAccountResponseBody, "moderation_api/models/operations/getaccount_responsebody.rb" autoload :GetAccountRequest, "moderation_api/models/operations/getaccount_request.rb" @@ -174,6 +182,83 @@ module Operations autoload :GetActionRequest, "moderation_api/models/operations/getaction_request.rb" autoload :GetActionResponse, "moderation_api/models/operations/getaction_response.rb" autoload :GetActionType, "moderation_api/models/operations/getaction_type.rb" + autoload :GetAnalyticsAuthorsResponseBody, "moderation_api/models/operations/getanalyticsauthors_responsebody.rb" + autoload :GetAnalyticsAuthorsAuthor, "moderation_api/models/operations/getanalyticsauthors_author.rb" + autoload( + :GetAnalyticsAuthorsQueryParamRange, + "moderation_api/models/operations/getanalyticsauthors_queryparam_range.rb" + ) + autoload( + :GetAnalyticsAuthorsRangeResponse, + "moderation_api/models/operations/getanalyticsauthors_range_response.rb" + ) + autoload :GetAnalyticsAuthorsRequest, "moderation_api/models/operations/getanalyticsauthors_request.rb" + autoload :GetAnalyticsAuthorsResponse, "moderation_api/models/operations/getanalyticsauthors_response.rb" + autoload( + :GetAnalyticsAutomationResponseBody, + "moderation_api/models/operations/getanalyticsautomation_responsebody.rb" + ) + autoload( + :GetAnalyticsAutomationQueryParamRange, + "moderation_api/models/operations/getanalyticsautomation_queryparam_range.rb" + ) + autoload( + :GetAnalyticsAutomationRangeResponse, + "moderation_api/models/operations/getanalyticsautomation_range_response.rb" + ) + autoload :GetAnalyticsAutomationRequest, "moderation_api/models/operations/getanalyticsautomation_request.rb" + autoload :GetAnalyticsAutomationResponse, "moderation_api/models/operations/getanalyticsautomation_response.rb" + autoload( + :GetAnalyticsChannelsResponseBody, + "moderation_api/models/operations/getanalyticschannels_responsebody.rb" + ) + autoload( + :GetAnalyticsChannelsQueryParamRange, + "moderation_api/models/operations/getanalyticschannels_queryparam_range.rb" + ) + autoload( + :GetAnalyticsChannelsRangeResponse, + "moderation_api/models/operations/getanalyticschannels_range_response.rb" + ) + autoload :GetAnalyticsChannelsRequest, "moderation_api/models/operations/getanalyticschannels_request.rb" + autoload :GetAnalyticsChannelsResponse, "moderation_api/models/operations/getanalyticschannels_response.rb" + autoload( + :GetAnalyticsPoliciesResponseBody, + "moderation_api/models/operations/getanalyticspolicies_responsebody.rb" + ) + autoload :GetAnalyticsPoliciesPolicy, "moderation_api/models/operations/getanalyticspolicies_policy.rb" + autoload( + :GetAnalyticsPoliciesQueryParamRange, + "moderation_api/models/operations/getanalyticspolicies_queryparam_range.rb" + ) + autoload( + :GetAnalyticsPoliciesRangeResponse, + "moderation_api/models/operations/getanalyticspolicies_range_response.rb" + ) + autoload :GetAnalyticsPoliciesRequest, "moderation_api/models/operations/getanalyticspolicies_request.rb" + autoload :GetAnalyticsPoliciesResponse, "moderation_api/models/operations/getanalyticspolicies_response.rb" + autoload :GetAnalyticsSummaryResponseBody, "moderation_api/models/operations/getanalyticssummary_responsebody.rb" + autoload( + :GetAnalyticsSummaryQueryParamRange, + "moderation_api/models/operations/getanalyticssummary_queryparam_range.rb" + ) + autoload( + :GetAnalyticsSummaryRangeResponse, + "moderation_api/models/operations/getanalyticssummary_range_response.rb" + ) + autoload :GetAnalyticsSummaryRequest, "moderation_api/models/operations/getanalyticssummary_request.rb" + autoload :GetAnalyticsSummaryResponse, "moderation_api/models/operations/getanalyticssummary_response.rb" + autoload :GetAnalyticsVolumesResponseBody, "moderation_api/models/operations/getanalyticsvolumes_responsebody.rb" + autoload( + :GetAnalyticsVolumesQueryParamRange, + "moderation_api/models/operations/getanalyticsvolumes_queryparam_range.rb" + ) + autoload( + :GetAnalyticsVolumesRangeResponse, + "moderation_api/models/operations/getanalyticsvolumes_range_response.rb" + ) + autoload :GetAnalyticsVolumesRequest, "moderation_api/models/operations/getanalyticsvolumes_request.rb" + autoload :GetAnalyticsVolumesResponse, "moderation_api/models/operations/getanalyticsvolumes_response.rb" autoload :GetAuthorRequest, "moderation_api/models/operations/getauthor_request.rb" autoload :GetAuthorResponse, "moderation_api/models/operations/getauthor_response.rb" autoload :GetChannelRequest, "moderation_api/models/operations/getchannel_request.rb" @@ -184,11 +269,8 @@ module Operations autoload :GetQueueStatsRequest, "moderation_api/models/operations/getqueuestats_request.rb" autoload :GetQueueStatsResponse, "moderation_api/models/operations/getqueuestats_response.rb" autoload :GetQueueResponseBody, "moderation_api/models/operations/getqueue_responsebody.rb" - autoload :GetQueueContentType, "moderation_api/models/operations/getqueue_contenttype.rb" - autoload :GetQueueRecommendationAction, "moderation_api/models/operations/getqueue_recommendationaction.rb" autoload :GetQueueRequest, "moderation_api/models/operations/getqueue_request.rb" autoload :GetQueueResponse, "moderation_api/models/operations/getqueue_response.rb" - autoload :GetQueueType, "moderation_api/models/operations/getqueue_type.rb" autoload :GetWebhookSecretResponseBody, "moderation_api/models/operations/getwebhooksecret_responsebody.rb" autoload :GetWebhookSecretRequest, "moderation_api/models/operations/getwebhooksecret_request.rb" autoload :GetWebhookSecretResponse, "moderation_api/models/operations/getwebhooksecret_response.rb" @@ -214,7 +296,7 @@ module Operations autoload :GetWordlistResponse, "moderation_api/models/operations/getwordlist_response.rb" autoload :GlobalFlaggingMode, "moderation_api/models/operations/globalflaggingmode.rb" autoload :Insight, "moderation_api/models/operations/insight.rb" - autoload :IsFlagged, "moderation_api/models/operations/isflagged.rb" + autoload :Label, "moderation_api/models/operations/label.rb" autoload :ListActionsResponseBody, "moderation_api/models/operations/listactions_responsebody.rb" autoload :ListActionsData, "moderation_api/models/operations/listactions_data.rb" autoload :ListActionsPosition, "moderation_api/models/operations/listactions_position.rb" @@ -226,7 +308,6 @@ module Operations autoload :ListAuthorsResponseBody, "moderation_api/models/operations/listauthors_responsebody.rb" autoload :ListAuthorsRequest, "moderation_api/models/operations/listauthors_request.rb" autoload :ListAuthorsResponse, "moderation_api/models/operations/listauthors_response.rb" - autoload :ListAuthorsSortDirection, "moderation_api/models/operations/listauthors_sortdirection.rb" autoload :ListChannelsResponseBody, "moderation_api/models/operations/listchannels_responsebody.rb" autoload :ListChannelsRequest, "moderation_api/models/operations/listchannels_request.rb" autoload :ListChannelsResponse, "moderation_api/models/operations/listchannels_response.rb" @@ -234,13 +315,11 @@ module Operations autoload :ListProjectsRequest, "moderation_api/models/operations/listprojects_request.rb" autoload :ListProjectsResponse, "moderation_api/models/operations/listprojects_response.rb" autoload :ListQueueItemsResponseBody, "moderation_api/models/operations/listqueueitems_responsebody.rb" - autoload :ListQueueItemsAction, "moderation_api/models/operations/listqueueitems_action.rb" - autoload :ListQueueItemsData, "moderation_api/models/operations/listqueueitems_data.rb" - autoload :ListQueueItemsLabel, "moderation_api/models/operations/listqueueitems_label.rb" autoload :ListQueueItemsRequest, "moderation_api/models/operations/listqueueitems_request.rb" autoload :ListQueueItemsResponse, "moderation_api/models/operations/listqueueitems_response.rb" - autoload :ListQueueItemsSortDirection, "moderation_api/models/operations/listqueueitems_sortdirection.rb" - autoload :ListQueueItemsStatus, "moderation_api/models/operations/listqueueitems_status.rb" + autoload :ListQueuesResponseBody, "moderation_api/models/operations/listqueues_responsebody.rb" + autoload :ListQueuesRequest, "moderation_api/models/operations/listqueues_request.rb" + autoload :ListQueuesResponse, "moderation_api/models/operations/listqueues_response.rb" autoload :ListWebhooksResponseBody, "moderation_api/models/operations/listwebhooks_responsebody.rb" autoload :ListWebhooksData, "moderation_api/models/operations/listwebhooks_data.rb" autoload :ListWebhooksEventType, "moderation_api/models/operations/listwebhooks_eventtype.rb" @@ -253,51 +332,51 @@ module Operations autoload :ListWordlistsResponse, "moderation_api/models/operations/listwordlists_response.rb" autoload :Match, "moderation_api/models/operations/match.rb" autoload :MatchedRule, "moderation_api/models/operations/matched_rule.rb" - autoload :MediaType, "moderation_api/models/operations/mediatype.rb" autoload :Meta, "moderation_api/models/operations/meta.rb" autoload :MetaType, "moderation_api/models/operations/metatype.rb" autoload :MetaStatus, "moderation_api/models/operations/meta_status.rb" - autoload :MetadataFilter, "moderation_api/models/operations/metadatafilter.rb" autoload :Method, "moderation_api/models/operations/method.rb" autoload :Modified, "moderation_api/models/operations/modified.rb" autoload :PolicyRequest, "moderation_api/models/operations/policy_request.rb" - autoload :PolicyResponse, "moderation_api/models/operations/policy_response.rb" - autoload :Queue, "moderation_api/models/operations/queue.rb" + autoload :PreviousPeriod, "moderation_api/models/operations/previousperiod.rb" autoload :ReasonCode, "moderation_api/models/operations/reason_code.rb" autoload :ReasonCodeEnum, "moderation_api/models/operations/reason_code_enum.rb" autoload :Recommendation, "moderation_api/models/operations/recommendation.rb" autoload :RemoveWordlistWordsResponseBody, "moderation_api/models/operations/removewordlistwords_responsebody.rb" autoload :RemoveWordlistWordsRequest, "moderation_api/models/operations/removewordlistwords_request.rb" autoload :RemoveWordlistWordsResponse, "moderation_api/models/operations/removewordlistwords_response.rb" - autoload :ResolveQueueItemRequestBody, "moderation_api/models/operations/resolvequeueitem_requestbody.rb" autoload :ResolveQueueItemResponseBody, "moderation_api/models/operations/resolvequeueitem_responsebody.rb" autoload :ResolveQueueItemRequest, "moderation_api/models/operations/resolvequeueitem_request.rb" autoload :ResolveQueueItemResponse, "moderation_api/models/operations/resolvequeueitem_response.rb" + autoload :ResolveQueueItemsRequestBody, "moderation_api/models/operations/resolvequeueitems_requestbody.rb" + autoload :ResolveQueueItemsResponseBody, "moderation_api/models/operations/resolvequeueitems_responsebody.rb" + autoload :ResolveQueueItemsRequest, "moderation_api/models/operations/resolvequeueitems_request.rb" + autoload :ResolveQueueItemsResponse, "moderation_api/models/operations/resolvequeueitems_response.rb" autoload :ReviewStats, "moderation_api/models/operations/reviewstats.rb" + autoload :Rule, "moderation_api/models/operations/rule.rb" autoload :Scores, "moderation_api/models/operations/scores.rb" autoload :SignalsRequest, "moderation_api/models/operations/signals_request.rb" autoload :SignalsResponse, "moderation_api/models/operations/signals_response.rb" + autoload :Sort, "moderation_api/models/operations/sort.rb" autoload :SortBy, "moderation_api/models/operations/sortby.rb" - autoload :SortField, "moderation_api/models/operations/sortfield.rb" + autoload :SortDirection, "moderation_api/models/operations/sortdirection.rb" + autoload :Source, "moderation_api/models/operations/source.rb" autoload :SubmitContentRequestBody, "moderation_api/models/operations/submitcontent_requestbody.rb" autoload :SubmitContentResponseBody, "moderation_api/models/operations/submitcontent_responsebody.rb" - autoload :SubmitContentLabel, "moderation_api/models/operations/submitcontent_label.rb" - autoload( - :SubmitContentRecommendationAction, - "moderation_api/models/operations/submitcontent_recommendation_action.rb" - ) + autoload :SubmitContentAuthor, "moderation_api/models/operations/submitcontent_author.rb" + autoload :SubmitContentPolicyResponse, "moderation_api/models/operations/submitcontent_policy_response.rb" autoload :SubmitContentRequest, "moderation_api/models/operations/submitcontent_request.rb" autoload :SubmitContentResponse, "moderation_api/models/operations/submitcontent_response.rb" - autoload :TopAction, "moderation_api/models/operations/topaction.rb" autoload :TopReviewer, "moderation_api/models/operations/topreviewer.rb" autoload :Topic, "moderation_api/models/operations/topic.rb" + autoload :Totals, "moderation_api/models/operations/totals.rb" autoload :TranscriptionQuality, "moderation_api/models/operations/transcriptionquality.rb" autoload :Trends, "moderation_api/models/operations/trends.rb" autoload :TrustLevel, "moderation_api/models/operations/trust_level.rb" - autoload :UnresolveQueueItemRequestBody, "moderation_api/models/operations/unresolvequeueitem_requestbody.rb" autoload :UnresolveQueueItemResponseBody, "moderation_api/models/operations/unresolvequeueitem_responsebody.rb" autoload :UnresolveQueueItemRequest, "moderation_api/models/operations/unresolvequeueitem_request.rb" autoload :UnresolveQueueItemResponse, "moderation_api/models/operations/unresolvequeueitem_response.rb" + autoload :UnresolveQueueItemStatus, "moderation_api/models/operations/unresolvequeueitem_status.rb" autoload :UpdateActionRequestBody, "moderation_api/models/operations/updateaction_requestbody.rb" autoload :UpdateActionResponseBody, "moderation_api/models/operations/updateaction_responsebody.rb" autoload :UpdateActionPositionRequest, "moderation_api/models/operations/updateaction_position_request.rb" @@ -346,7 +425,7 @@ module Operations autoload :UpdateWordlistResponse, "moderation_api/models/operations/updatewordlist_response.rb" autoload :Value, "moderation_api/models/operations/value.rb" autoload :Verdict, "moderation_api/models/operations/verdict.rb" - autoload :WithinUnit, "moderation_api/models/operations/withinunit.rb" + autoload :Volume, "moderation_api/models/operations/volume.rb" end end end diff --git a/lib/moderation_api/models/operations/getqueue_recommendationaction.rb b/lib/moderation_api/models/operations/action_response.rb similarity index 79% rename from lib/moderation_api/models/operations/getqueue_recommendationaction.rb rename to lib/moderation_api/models/operations/action_response.rb index 0c823be9..38ed44ae 100644 --- a/lib/moderation_api/models/operations/getqueue_recommendationaction.rb +++ b/lib/moderation_api/models/operations/action_response.rb @@ -6,8 +6,8 @@ module ModerationApi module Models module Operations - - class GetQueueRecommendationAction + # ActionResponse - The action to take based on the recommendation + class ActionResponse include ::Crystalline::Enum enums do REVIEW = new("review") diff --git a/lib/moderation_api/models/operations/action_response.rbi b/lib/moderation_api/models/operations/action_response.rbi new file mode 100644 index 00000000..7de52a91 --- /dev/null +++ b/lib/moderation_api/models/operations/action_response.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::ActionResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::ActionResponse +end diff --git a/lib/moderation_api/models/operations/actionstat.rb b/lib/moderation_api/models/operations/actionstat.rb deleted file mode 100644 index 686a3700..00000000 --- a/lib/moderation_api/models/operations/actionstat.rb +++ /dev/null @@ -1,59 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - - class ActionStat - extend T::Sig - include Crystalline::MetadataFields - - # ID of the moderation action - field( - :action_id, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("actionId"), required: true}} - ) - # Name of the moderation action - field( - :action_name, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("actionName"), required: true}} - ) - # Number of times this action was taken - field( - :count, - ::Float, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("count"), required: true}} - ) - # Percentage this action represents of all actions - field( - :percentage_of_total, - ::Float, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("percentageOfTotal"), required: true}} - ) - - sig { params(action_id: ::String, action_name: ::String, count: ::Float, percentage_of_total: ::Float).void } - def initialize(action_id:, action_name:, count:, percentage_of_total:) - @action_id = action_id - @action_name = action_name - @count = count - @percentage_of_total = percentage_of_total - end - - sig { params(other: T.untyped).returns(T::Boolean) } - def ==(other) - return false unless other.is_a?(self.class) - return false unless @action_id == other.action_id - return false unless @action_name == other.action_name - return false unless @count == other.count - return false unless @percentage_of_total == other.percentage_of_total - true - end - end - end - end -end diff --git a/lib/moderation_api/models/operations/actionstat.rbi b/lib/moderation_api/models/operations/actionstat.rbi deleted file mode 100644 index a5714a5b..00000000 --- a/lib/moderation_api/models/operations/actionstat.rbi +++ /dev/null @@ -1,32 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::ActionStat - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::ActionStat - def action_id - end - - def action_id=(str_) - end - - def action_name - end - - def action_name=(str_) - end - - def count - end - - def count=(str_) - end - - def percentage_of_total - end - - def percentage_of_total=(str_) - end -end diff --git a/lib/moderation_api/models/operations/addwordlistwords_request.rb b/lib/moderation_api/models/operations/addwordlistwords_request.rb index 7b8fc312..c845f8a8 100644 --- a/lib/moderation_api/models/operations/addwordlistwords_request.rb +++ b/lib/moderation_api/models/operations/addwordlistwords_request.rb @@ -15,7 +15,7 @@ class AddWordlistWordsRequest field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field :body, Models::Operations::AddWordlistWordsRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/checkstatus.rb b/lib/moderation_api/models/operations/bucket.rb similarity index 68% rename from lib/moderation_api/models/operations/checkstatus.rb rename to lib/moderation_api/models/operations/bucket.rb index 2238ba00..98ca158b 100644 --- a/lib/moderation_api/models/operations/checkstatus.rb +++ b/lib/moderation_api/models/operations/bucket.rb @@ -6,13 +6,12 @@ module ModerationApi module Models module Operations - - class CheckStatus + # Bucket - The size of each entry in `volumes`. + class Bucket include ::Crystalline::Enum enums do - ALL = new("all") - CHECKED = new("checked") - UNCHECKED = new("unchecked") + HOUR = new("hour") + DAY = new("day") end open! diff --git a/lib/moderation_api/models/components/status.rbi b/lib/moderation_api/models/operations/bucket.rbi similarity index 52% rename from lib/moderation_api/models/components/status.rbi rename to lib/moderation_api/models/operations/bucket.rbi index 548a323e..1cbfa6aa 100644 --- a/lib/moderation_api/models/components/status.rbi +++ b/lib/moderation_api/models/operations/bucket.rbi @@ -1,9 +1,9 @@ # typed: true # frozen_string_literal: true -class ModerationApi::Models::Components::Status +class ModerationApi::Models::Operations::Bucket extend ::Crystalline::MetadataFields::ClassMethods end -class ModerationApi::Models::Components::Status +class ModerationApi::Models::Operations::Bucket end diff --git a/lib/moderation_api/models/operations/casebookagreement.rbi b/lib/moderation_api/models/operations/casebookagreement.rbi deleted file mode 100644 index b8f55890..00000000 --- a/lib/moderation_api/models/operations/casebookagreement.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::CasebookAgreement - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::CasebookAgreement -end diff --git a/lib/moderation_api/models/operations/casebookanswer.rbi b/lib/moderation_api/models/operations/casebookanswer.rbi deleted file mode 100644 index a095365c..00000000 --- a/lib/moderation_api/models/operations/casebookanswer.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::CasebookAnswer - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::CasebookAnswer -end diff --git a/lib/moderation_api/models/operations/listqueueitems_action.rb b/lib/moderation_api/models/operations/channel.rb similarity index 53% rename from lib/moderation_api/models/operations/listqueueitems_action.rb rename to lib/moderation_api/models/operations/channel.rb index b4262f29..45df0f2a 100644 --- a/lib/moderation_api/models/operations/listqueueitems_action.rb +++ b/lib/moderation_api/models/operations/channel.rb @@ -7,53 +7,44 @@ module ModerationApi module Models module Operations - class ListQueueItemsAction + class Channel extend T::Sig include Crystalline::MetadataFields - # Action ID + # The channel ID. field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}} - # Action name + # The channel name. field( :name, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} ) - # Unix timestamp of when the action was taken + # Requests received in this channel. field( - :timestamp, - ::Float, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("timestamp"), required: true}} + :requests, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("requests"), required: true}} ) - # Action comment + # Requests flagged in this channel. field( - :comment, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("comment")}} + :flagged, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagged"), required: true}} ) - # Moderator userID + # The share of requests in this channel that were flagged: flagged / requests. field( - :reviewer, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("reviewer")}} + :flag_rate, + ::Float, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagRate"), required: true}} ) - sig { - params( - id: ::String, - name: ::String, - timestamp: ::Float, - comment: T.nilable(::String), - reviewer: T.nilable(::String) - ) - .void - } - def initialize(id:, name:, timestamp:, comment: nil, reviewer: nil) + sig { params(id: ::String, name: ::String, requests: ::Integer, flagged: ::Integer, flag_rate: ::Float).void } + def initialize(id:, name:, requests:, flagged:, flag_rate:) @id = id @name = name - @timestamp = timestamp - @comment = comment - @reviewer = reviewer + @requests = requests + @flagged = flagged + @flag_rate = flag_rate end sig { params(other: T.untyped).returns(T::Boolean) } @@ -61,9 +52,9 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @name == other.name - return false unless @timestamp == other.timestamp - return false unless @comment == other.comment - return false unless @reviewer == other.reviewer + return false unless @requests == other.requests + return false unless @flagged == other.flagged + return false unless @flag_rate == other.flag_rate true end end diff --git a/lib/moderation_api/models/operations/channel.rbi b/lib/moderation_api/models/operations/channel.rbi new file mode 100644 index 00000000..eede39cf --- /dev/null +++ b/lib/moderation_api/models/operations/channel.rbi @@ -0,0 +1,38 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::Channel + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::Channel + def id + end + + def id=(str_) + end + + def name + end + + def name=(str_) + end + + def requests + end + + def requests=(str_) + end + + def flagged + end + + def flagged=(str_) + end + + def flag_rate + end + + def flag_rate=(str_) + end +end diff --git a/lib/moderation_api/models/operations/checkstatus.rbi b/lib/moderation_api/models/operations/checkstatus.rbi deleted file mode 100644 index 5bd82375..00000000 --- a/lib/moderation_api/models/operations/checkstatus.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::CheckStatus - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::CheckStatus -end diff --git a/lib/moderation_api/models/operations/classifier_output.rb b/lib/moderation_api/models/operations/classifier_output.rb index c47e0406..c97619ff 100644 --- a/lib/moderation_api/models/operations/classifier_output.rb +++ b/lib/moderation_api/models/operations/classifier_output.rb @@ -40,7 +40,7 @@ class ClassifierOutput field( :labels, - Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::SubmitContentLabel)), + Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::Label)), {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("labels")}} ) # Optional structured data produced by the policy. For face detection: { count, faces: [{ confidence, gender, age }] }. @@ -57,7 +57,7 @@ class ClassifierOutput flagged: T::Boolean, type: ::String, flagged_fields: T.nilable(T::Array[::String]), - labels: T.nilable(T::Array[Models::Operations::SubmitContentLabel]), + labels: T.nilable(T::Array[Models::Operations::Label]), data: T.nilable(T::Hash[Symbol, ::Object]) ) .void diff --git a/lib/moderation_api/models/operations/createaction_request.rb b/lib/moderation_api/models/operations/createaction_request.rb index acd6aef0..c45ebca6 100644 --- a/lib/moderation_api/models/operations/createaction_request.rb +++ b/lib/moderation_api/models/operations/createaction_request.rb @@ -12,7 +12,7 @@ class CreateActionRequest include Crystalline::MetadataFields field :body, Models::Operations::CreateActionRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/createauthor_request.rb b/lib/moderation_api/models/operations/createauthor_request.rb index 8e8fdca3..d4bd9d1b 100644 --- a/lib/moderation_api/models/operations/createauthor_request.rb +++ b/lib/moderation_api/models/operations/createauthor_request.rb @@ -12,7 +12,7 @@ class CreateAuthorRequest include Crystalline::MetadataFields field :body, Models::Operations::CreateAuthorRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/createfeedback_request.rb b/lib/moderation_api/models/operations/createfeedback_request.rb new file mode 100644 index 00000000..ee1e07cb --- /dev/null +++ b/lib/moderation_api/models/operations/createfeedback_request.rb @@ -0,0 +1,38 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateFeedbackRequest + extend T::Sig + include Crystalline::MetadataFields + + field :body, Models::Operations::CreateFeedbackRequestBody, {'request': {'media_type': "application/json"}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + + sig { params(body: Models::Operations::CreateFeedbackRequestBody, project_id: T.nilable(::String)).void } + def initialize(body:, project_id: nil) + @body = body + @project_id = project_id + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @body == other.body + return false unless @project_id == other.project_id + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createfeedback_request.rbi b/lib/moderation_api/models/operations/createfeedback_request.rbi new file mode 100644 index 00000000..c8598672 --- /dev/null +++ b/lib/moderation_api/models/operations/createfeedback_request.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateFeedbackRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateFeedbackRequest + def body + end + + def body=(str_) + end + + def project_id + end + + def project_id=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createfeedback_requestbody.rb b/lib/moderation_api/models/operations/createfeedback_requestbody.rb new file mode 100644 index 00000000..56e518d7 --- /dev/null +++ b/lib/moderation_api/models/operations/createfeedback_requestbody.rb @@ -0,0 +1,82 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateFeedbackRequestBody + extend T::Sig + include Crystalline::MetadataFields + + # A short summary of the request. + field( + :title, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("title"), required: true}} + ) + # What you tried to do, why, and what is missing or does not work. Plain text. Blank lines start new paragraphs. + field( + :description, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description"), required: true}} + ) + # The kind of feedback. + field( + :type, + Crystalline::Nilable.new(Models::Operations::CreateFeedbackType), + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("type"), + 'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::CreateFeedbackType, true) + } + } + ) + # Where the feedback was written: MCP server, agent skill, CLI or API. + field( + :source, + Crystalline::Nilable.new(Models::Operations::Source), + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("source"), + 'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::Source, true) + } + } + ) + + sig { + params( + title: ::String, + description: ::String, + type: T.nilable(Models::Operations::CreateFeedbackType), + source: T.nilable(Models::Operations::Source) + ) + .void + } + def initialize( + title:, + description:, + type: Models::Operations::CreateFeedbackType::FEATURE_REQUEST, + source: Models::Operations::Source::API + ) + @title = title + @description = description + @type = type + @source = source + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @title == other.title + return false unless @description == other.description + return false unless @type == other.type + return false unless @source == other.source + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createfeedback_requestbody.rbi b/lib/moderation_api/models/operations/createfeedback_requestbody.rbi new file mode 100644 index 00000000..e40eceb1 --- /dev/null +++ b/lib/moderation_api/models/operations/createfeedback_requestbody.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateFeedbackRequestBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateFeedbackRequestBody + def title + end + + def title=(str_) + end + + def description + end + + def description=(str_) + end + + def type + end + + def type=(str_) + end + + def source + end + + def source=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createfeedback_response.rb b/lib/moderation_api/models/operations/createfeedback_response.rb new file mode 100644 index 00000000..71805aac --- /dev/null +++ b/lib/moderation_api/models/operations/createfeedback_response.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateFeedbackResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # Feedback received + field :object, Crystalline::Nilable.new(Models::Operations::CreateFeedbackResponseBody) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + object: T.nilable(Models::Operations::CreateFeedbackResponseBody) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, object: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @object = object + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createfeedback_response.rbi b/lib/moderation_api/models/operations/createfeedback_response.rbi new file mode 100644 index 00000000..0c3cb2e2 --- /dev/null +++ b/lib/moderation_api/models/operations/createfeedback_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateFeedbackResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateFeedbackResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def object + end + + def object=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createfeedback_responsebody.rb b/lib/moderation_api/models/operations/createfeedback_responsebody.rb new file mode 100644 index 00000000..a626800c --- /dev/null +++ b/lib/moderation_api/models/operations/createfeedback_responsebody.rb @@ -0,0 +1,43 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Feedback received + class CreateFeedbackResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # ID of the feedback. + field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}} + # The team received the feedback. + field( + :status, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("status"), required: true}} + ) + + sig { params(id: ::String, status: ::String).void } + def initialize(id:, status: "received") + @id = id + unless status == "received" + raise ArgumentError, "Invalid value for status" + end + + @status = "received" + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @id == other.id + return false unless @status == other.status + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createfeedback_responsebody.rbi b/lib/moderation_api/models/operations/createfeedback_responsebody.rbi new file mode 100644 index 00000000..fee2591d --- /dev/null +++ b/lib/moderation_api/models/operations/createfeedback_responsebody.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateFeedbackResponseBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateFeedbackResponseBody + def id + end + + def id=(str_) + end + + def status + end + + def status=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createfeedback_type.rb b/lib/moderation_api/models/operations/createfeedback_type.rb new file mode 100644 index 00000000..746d8c89 --- /dev/null +++ b/lib/moderation_api/models/operations/createfeedback_type.rb @@ -0,0 +1,19 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # CreateFeedbackType - The kind of feedback. + class CreateFeedbackType < T::Enum + enums do + FEATURE_REQUEST = new("feature_request") + BUG = new("bug") + OTHER = new("other") + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createfeedback_type.rbi b/lib/moderation_api/models/operations/createfeedback_type.rbi new file mode 100644 index 00000000..fe7dead6 --- /dev/null +++ b/lib/moderation_api/models/operations/createfeedback_type.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateFeedbackType + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateFeedbackType +end diff --git a/lib/moderation_api/models/operations/createprojectapikey_request.rb b/lib/moderation_api/models/operations/createprojectapikey_request.rb new file mode 100644 index 00000000..7797dd4a --- /dev/null +++ b/lib/moderation_api/models/operations/createprojectapikey_request.rb @@ -0,0 +1,35 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateProjectApiKeyRequest + extend T::Sig + include Crystalline::MetadataFields + + # The ID of the project. + field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + + field :body, Models::Operations::CreateProjectApiKeyRequestBody, {'request': {'media_type': "application/json"}} + + sig { params(id: ::String, body: Models::Operations::CreateProjectApiKeyRequestBody).void } + def initialize(id:, body:) + @id = id + @body = body + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @id == other.id + return false unless @body == other.body + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createprojectapikey_request.rbi b/lib/moderation_api/models/operations/createprojectapikey_request.rbi new file mode 100644 index 00000000..fb722305 --- /dev/null +++ b/lib/moderation_api/models/operations/createprojectapikey_request.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateProjectApiKeyRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateProjectApiKeyRequest + def id + end + + def id=(str_) + end + + def body + end + + def body=(str_) + end +end diff --git a/lib/moderation_api/models/operations/resolvequeueitem_requestbody.rb b/lib/moderation_api/models/operations/createprojectapikey_requestbody.rb similarity index 59% rename from lib/moderation_api/models/operations/resolvequeueitem_requestbody.rb rename to lib/moderation_api/models/operations/createprojectapikey_requestbody.rb index 85722d6b..7d6b4740 100644 --- a/lib/moderation_api/models/operations/resolvequeueitem_requestbody.rb +++ b/lib/moderation_api/models/operations/createprojectapikey_requestbody.rb @@ -7,26 +7,26 @@ module ModerationApi module Models module Operations - class ResolveQueueItemRequestBody + class CreateProjectApiKeyRequestBody extend T::Sig include Crystalline::MetadataFields - # Optional comment + # 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. field( - :comment, + :name, Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("comment")}} + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name")}} ) - sig { params(comment: T.nilable(::String)).void } - def initialize(comment: nil) - @comment = comment + sig { params(name: T.nilable(::String)).void } + def initialize(name: "API key") + @name = name end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) - return false unless @comment == other.comment + return false unless @name == other.name true end end diff --git a/lib/moderation_api/models/operations/createprojectapikey_requestbody.rbi b/lib/moderation_api/models/operations/createprojectapikey_requestbody.rbi new file mode 100644 index 00000000..335d69b8 --- /dev/null +++ b/lib/moderation_api/models/operations/createprojectapikey_requestbody.rbi @@ -0,0 +1,14 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateProjectApiKeyRequestBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateProjectApiKeyRequestBody + def name + end + + def name=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createprojectapikey_response.rb b/lib/moderation_api/models/operations/createprojectapikey_response.rb new file mode 100644 index 00000000..6fdd3cd5 --- /dev/null +++ b/lib/moderation_api/models/operations/createprojectapikey_response.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateProjectApiKeyResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # API key created successfully + field :project_api_key, Crystalline::Nilable.new(Models::Components::ProjectApiKey) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + project_api_key: T.nilable(Models::Components::ProjectApiKey) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, project_api_key: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @project_api_key = project_api_key + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @project_api_key == other.project_api_key + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createprojectapikey_response.rbi b/lib/moderation_api/models/operations/createprojectapikey_response.rbi new file mode 100644 index 00000000..6934b979 --- /dev/null +++ b/lib/moderation_api/models/operations/createprojectapikey_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateProjectApiKeyResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateProjectApiKeyResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def project_api_key + end + + def project_api_key=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createwebhook_request.rb b/lib/moderation_api/models/operations/createwebhook_request.rb index ffca28b8..71f5b96d 100644 --- a/lib/moderation_api/models/operations/createwebhook_request.rb +++ b/lib/moderation_api/models/operations/createwebhook_request.rb @@ -12,7 +12,7 @@ class CreateWebhookRequest include Crystalline::MetadataFields field :body, Models::Operations::CreateWebhookRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/createwordlist_request.rb b/lib/moderation_api/models/operations/createwordlist_request.rb new file mode 100644 index 00000000..23752e83 --- /dev/null +++ b/lib/moderation_api/models/operations/createwordlist_request.rb @@ -0,0 +1,38 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateWordlistRequest + extend T::Sig + include Crystalline::MetadataFields + + field :body, Models::Operations::CreateWordlistRequestBody, {'request': {'media_type': "application/json"}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + + sig { params(body: Models::Operations::CreateWordlistRequestBody, project_id: T.nilable(::String)).void } + def initialize(body:, project_id: nil) + @body = body + @project_id = project_id + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @body == other.body + return false unless @project_id == other.project_id + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createwordlist_request.rbi b/lib/moderation_api/models/operations/createwordlist_request.rbi new file mode 100644 index 00000000..132c0cb4 --- /dev/null +++ b/lib/moderation_api/models/operations/createwordlist_request.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateWordlistRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateWordlistRequest + def body + end + + def body=(str_) + end + + def project_id + end + + def project_id=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createwordlist_requestbody.rb b/lib/moderation_api/models/operations/createwordlist_requestbody.rb new file mode 100644 index 00000000..845b0ae4 --- /dev/null +++ b/lib/moderation_api/models/operations/createwordlist_requestbody.rb @@ -0,0 +1,67 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateWordlistRequestBody + extend T::Sig + include Crystalline::MetadataFields + + # Name of the wordlist + field( + :name, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} + ) + # Key of the wordlist. Default: made from the name. If the key is already in use, a suffix is added. + field( + :key, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("key")}} + ) + # Description of the wordlist + field( + :description, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description")}} + ) + # Words to add to the wordlist. Words are converted to lowercase. Duplicate and empty words are ignored. Maximum 5000 words. + field( + :words, + Crystalline::Nilable.new(Crystalline::Array.new(::String)), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("words")}} + ) + + sig { + params( + name: ::String, + key: T.nilable(::String), + description: T.nilable(::String), + words: T.nilable(T::Array[::String]) + ) + .void + } + def initialize(name:, key: nil, description: nil, words: nil) + @name = name + @key = key + @description = description + @words = words + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @name == other.name + return false unless @key == other.key + return false unless @description == other.description + return false unless @words == other.words + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createwordlist_requestbody.rbi b/lib/moderation_api/models/operations/createwordlist_requestbody.rbi new file mode 100644 index 00000000..c85f77b1 --- /dev/null +++ b/lib/moderation_api/models/operations/createwordlist_requestbody.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateWordlistRequestBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateWordlistRequestBody + def name + end + + def name=(str_) + end + + def key + end + + def key=(str_) + end + + def description + end + + def description=(str_) + end + + def words + end + + def words=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createwordlist_response.rb b/lib/moderation_api/models/operations/createwordlist_response.rb new file mode 100644 index 00000000..42506ac1 --- /dev/null +++ b/lib/moderation_api/models/operations/createwordlist_response.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class CreateWordlistResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # Wordlist created successfully + field :object, Crystalline::Nilable.new(Models::Operations::CreateWordlistResponseBody) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + object: T.nilable(Models::Operations::CreateWordlistResponseBody) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, object: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @object = object + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createwordlist_response.rbi b/lib/moderation_api/models/operations/createwordlist_response.rbi new file mode 100644 index 00000000..061a65fd --- /dev/null +++ b/lib/moderation_api/models/operations/createwordlist_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateWordlistResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateWordlistResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def object + end + + def object=(str_) + end +end diff --git a/lib/moderation_api/models/operations/createwordlist_responsebody.rb b/lib/moderation_api/models/operations/createwordlist_responsebody.rb new file mode 100644 index 00000000..81280be8 --- /dev/null +++ b/lib/moderation_api/models/operations/createwordlist_responsebody.rb @@ -0,0 +1,90 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Wordlist created successfully + class CreateWordlistResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # ID of the wordlist + field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}} + # Words in the wordlist + field( + :words, + Crystalline::Array.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("words"), required: true}} + ) + # Creation date of the wordlist + field( + :created_at, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("createdAt"), required: true}} + ) + # ID of the organization + field( + :organization_id, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("organizationId"), required: true}} + ) + # Strict mode + field( + :strict, + Crystalline::Boolean.new, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("strict"), required: true}} + ) + + field( + :name, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} + ) + + field( + :user_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("userId"), required: true}} + ) + + sig { + params( + id: ::String, + words: T::Array[::String], + created_at: ::String, + organization_id: ::String, + strict: T::Boolean, + name: T.nilable(::String), + user_id: T.nilable(::String) + ) + .void + } + def initialize(id:, words:, created_at:, organization_id:, strict:, name: nil, user_id: nil) + @id = id + @words = words + @created_at = created_at + @organization_id = organization_id + @strict = strict + @name = name + @user_id = user_id + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @id == other.id + return false unless @words == other.words + return false unless @created_at == other.created_at + return false unless @organization_id == other.organization_id + return false unless @strict == other.strict + return false unless @name == other.name + return false unless @user_id == other.user_id + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/createwordlist_responsebody.rbi b/lib/moderation_api/models/operations/createwordlist_responsebody.rbi new file mode 100644 index 00000000..22e332ff --- /dev/null +++ b/lib/moderation_api/models/operations/createwordlist_responsebody.rbi @@ -0,0 +1,50 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::CreateWordlistResponseBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::CreateWordlistResponseBody + def id + end + + def id=(str_) + end + + def words + end + + def words=(str_) + end + + def created_at + end + + def created_at=(str_) + end + + def organization_id + end + + def organization_id=(str_) + end + + def strict + end + + def strict=(str_) + end + + def name + end + + def name=(str_) + end + + def user_id + end + + def user_id=(str_) + end +end diff --git a/lib/moderation_api/models/operations/dailyreviewcount.rb b/lib/moderation_api/models/operations/dailyreviewcount.rb index b73b4d9a..8cbab9bd 100644 --- a/lib/moderation_api/models/operations/dailyreviewcount.rb +++ b/lib/moderation_api/models/operations/dailyreviewcount.rb @@ -11,20 +11,20 @@ class DailyReviewCount extend T::Sig include Crystalline::MetadataFields - # Date in YYYY-MM-DD format + # Date in YYYY-MM-DD format (UTC). field( :date, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("date"), required: true}} ) - # Number of reviews on this date + # Number of items resolved. field( :count, - ::Float, + ::Integer, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("count"), required: true}} ) - sig { params(date: ::String, count: ::Float).void } + sig { params(date: ::String, count: ::Integer).void } def initialize(date:, count:) @date = date @count = count diff --git a/lib/moderation_api/models/operations/deleteaction_request.rb b/lib/moderation_api/models/operations/deleteaction_request.rb index 0d86491f..ac119405 100644 --- a/lib/moderation_api/models/operations/deleteaction_request.rb +++ b/lib/moderation_api/models/operations/deleteaction_request.rb @@ -13,7 +13,7 @@ class DeleteActionRequest # The ID of the action to delete. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/deleteauthor_request.rb b/lib/moderation_api/models/operations/deleteauthor_request.rb index 30002842..1f66839d 100644 --- a/lib/moderation_api/models/operations/deleteauthor_request.rb +++ b/lib/moderation_api/models/operations/deleteauthor_request.rb @@ -13,7 +13,7 @@ class DeleteAuthorRequest # Either external ID or the ID assigned by moderation API. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/deletewebhook_request.rb b/lib/moderation_api/models/operations/deletewebhook_request.rb index b5d56ace..48789d83 100644 --- a/lib/moderation_api/models/operations/deletewebhook_request.rb +++ b/lib/moderation_api/models/operations/deletewebhook_request.rb @@ -13,7 +13,7 @@ class DeleteWebhookRequest # The ID of the webhook to delete. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/executeaction_request.rb b/lib/moderation_api/models/operations/executeaction_request.rb index 3af79446..d9e8c2ce 100644 --- a/lib/moderation_api/models/operations/executeaction_request.rb +++ b/lib/moderation_api/models/operations/executeaction_request.rb @@ -12,7 +12,7 @@ class ExecuteActionRequest include Crystalline::MetadataFields field :body, Models::Operations::ExecuteActionRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/filter.rb b/lib/moderation_api/models/operations/filter.rb deleted file mode 100644 index d4c3cb4c..00000000 --- a/lib/moderation_api/models/operations/filter.rb +++ /dev/null @@ -1,306 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - - class Filter - extend T::Sig - include Crystalline::MetadataFields - - field( - :is_flagged, - Crystalline::Nilable.new(Models::Operations::IsFlagged), - { - 'format_json': { - 'letter_case': ::ModerationApi::Utils.field_name("isFlagged"), - 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::IsFlagged, true) - } - } - ) - - field( - :casebook_answer, - Crystalline::Nilable.new(Models::Operations::CasebookAnswer), - { - 'format_json': { - 'letter_case': ::ModerationApi::Utils.field_name("casebookAnswer"), - 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::CasebookAnswer, true) - } - } - ) - - field( - :casebook_agreement, - Crystalline::Nilable.new(Models::Operations::CasebookAgreement), - { - 'format_json': { - 'letter_case': ::ModerationApi::Utils.field_name("casebookAgreement"), - 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::CasebookAgreement, true) - } - } - ) - - field( - :labels, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("labels")}} - ) - - field( - :filter_labels, - Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::FilterLabel)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("filterLabels")}} - ) - - field( - :metadata_filters, - Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::MetadataFilter)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("metadataFilters")}} - ) - - field( - :filtered_channel_ids, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("filteredChannelIds")}} - ) - - field( - :filtered_action_ids, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("filteredActionIds")}} - ) - - field( - :languages, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("languages")}} - ) - - field( - :content_types, - Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::GetQueueContentType)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("contentTypes")}} - ) - - field( - :media_types, - Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::MediaType)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("mediaTypes")}} - ) - - field( - :author_trust_levels, - Crystalline::Nilable.new(Crystalline::Array.new(::Integer)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authorTrustLevels")}} - ) - - field( - :recommendation_actions, - Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::GetQueueRecommendationAction)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("recommendationActions")}} - ) - - field( - :min_severity, - Crystalline::Nilable.new(::Integer), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("minSeverity")}} - ) - - field( - :max_severity, - Crystalline::Nilable.new(::Integer), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("maxSeverity")}} - ) - - field( - :after_date, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("afterDate")}} - ) - - field( - :before_date, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("beforeDate")}} - ) - - field( - :within, - Crystalline::Nilable.new(::Float), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("within")}} - ) - - field( - :within_unit, - Crystalline::Nilable.new(Models::Operations::WithinUnit), - { - 'format_json': { - 'letter_case': ::ModerationApi::Utils.field_name("withinUnit"), - 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::WithinUnit, true) - } - } - ) - - field( - :clear_date_window, - Crystalline::Nilable.new(Crystalline::Boolean.new), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("clearDateWindow")}} - ) - - field( - :author_id, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authorID")}} - ) - - field( - :content_id, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("contentID")}} - ) - - field( - :conversation_ids, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("conversationIds")}} - ) - - field( - :search, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("search")}} - ) - - field( - :check_status, - Crystalline::Nilable.new(Models::Operations::CheckStatus), - { - 'format_json': { - 'letter_case': ::ModerationApi::Utils.field_name("checkStatus"), - 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::CheckStatus, true) - } - } - ) - - sig { - params( - is_flagged: T.nilable(Models::Operations::IsFlagged), - casebook_answer: T.nilable(Models::Operations::CasebookAnswer), - casebook_agreement: T.nilable(Models::Operations::CasebookAgreement), - labels: T.nilable(T::Array[::String]), - filter_labels: T.nilable(T::Array[Models::Operations::FilterLabel]), - metadata_filters: T.nilable(T::Array[Models::Operations::MetadataFilter]), - filtered_channel_ids: T.nilable(T::Array[::String]), - filtered_action_ids: T.nilable(T::Array[::String]), - languages: T.nilable(T::Array[::String]), - content_types: T.nilable(T::Array[Models::Operations::GetQueueContentType]), - media_types: T.nilable(T::Array[Models::Operations::MediaType]), - author_trust_levels: T.nilable(T::Array[::Integer]), - recommendation_actions: T.nilable(T::Array[Models::Operations::GetQueueRecommendationAction]), - min_severity: T.nilable(::Integer), - max_severity: T.nilable(::Integer), - after_date: T.nilable(::String), - before_date: T.nilable(::String), - within: T.nilable(::Float), - within_unit: T.nilable(Models::Operations::WithinUnit), - clear_date_window: T.nilable(T::Boolean), - author_id: T.nilable(::String), - content_id: T.nilable(::String), - conversation_ids: T.nilable(T::Array[::String]), - search: T.nilable(T::Array[::String]), - check_status: T.nilable(Models::Operations::CheckStatus) - ) - .void - } - def initialize( - is_flagged: nil, - casebook_answer: nil, - casebook_agreement: nil, - labels: nil, - filter_labels: nil, - metadata_filters: nil, - filtered_channel_ids: nil, - filtered_action_ids: nil, - languages: nil, - content_types: nil, - media_types: nil, - author_trust_levels: nil, - recommendation_actions: nil, - min_severity: nil, - max_severity: nil, - after_date: nil, - before_date: nil, - within: nil, - within_unit: nil, - clear_date_window: nil, - author_id: nil, - content_id: nil, - conversation_ids: nil, - search: nil, - check_status: nil - ) - @is_flagged = is_flagged - @casebook_answer = casebook_answer - @casebook_agreement = casebook_agreement - @labels = labels - @filter_labels = filter_labels - @metadata_filters = metadata_filters - @filtered_channel_ids = filtered_channel_ids - @filtered_action_ids = filtered_action_ids - @languages = languages - @content_types = content_types - @media_types = media_types - @author_trust_levels = author_trust_levels - @recommendation_actions = recommendation_actions - @min_severity = min_severity - @max_severity = max_severity - @after_date = after_date - @before_date = before_date - @within = within - @within_unit = within_unit - @clear_date_window = clear_date_window - @author_id = author_id - @content_id = content_id - @conversation_ids = conversation_ids - @search = search - @check_status = check_status - end - - sig { params(other: T.untyped).returns(T::Boolean) } - def ==(other) - return false unless other.is_a?(self.class) - return false unless @is_flagged == other.is_flagged - return false unless @casebook_answer == other.casebook_answer - return false unless @casebook_agreement == other.casebook_agreement - return false unless @labels == other.labels - return false unless @filter_labels == other.filter_labels - return false unless @metadata_filters == other.metadata_filters - return false unless @filtered_channel_ids == other.filtered_channel_ids - return false unless @filtered_action_ids == other.filtered_action_ids - return false unless @languages == other.languages - return false unless @content_types == other.content_types - return false unless @media_types == other.media_types - return false unless @author_trust_levels == other.author_trust_levels - return false unless @recommendation_actions == other.recommendation_actions - return false unless @min_severity == other.min_severity - return false unless @max_severity == other.max_severity - return false unless @after_date == other.after_date - return false unless @before_date == other.before_date - return false unless @within == other.within - return false unless @within_unit == other.within_unit - return false unless @clear_date_window == other.clear_date_window - return false unless @author_id == other.author_id - return false unless @content_id == other.content_id - return false unless @conversation_ids == other.conversation_ids - return false unless @search == other.search - return false unless @check_status == other.check_status - true - end - end - end - end -end diff --git a/lib/moderation_api/models/operations/filter.rbi b/lib/moderation_api/models/operations/filter.rbi deleted file mode 100644 index 0e057870..00000000 --- a/lib/moderation_api/models/operations/filter.rbi +++ /dev/null @@ -1,158 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::Filter - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::Filter - def is_flagged - end - - def is_flagged=(str_) - end - - def casebook_answer - end - - def casebook_answer=(str_) - end - - def casebook_agreement - end - - def casebook_agreement=(str_) - end - - def labels - end - - def labels=(str_) - end - - def filter_labels - end - - def filter_labels=(str_) - end - - def metadata_filters - end - - def metadata_filters=(str_) - end - - def filtered_channel_ids - end - - def filtered_channel_ids=(str_) - end - - def filtered_action_ids - end - - def filtered_action_ids=(str_) - end - - def languages - end - - def languages=(str_) - end - - def content_types - end - - def content_types=(str_) - end - - def media_types - end - - def media_types=(str_) - end - - def author_trust_levels - end - - def author_trust_levels=(str_) - end - - def recommendation_actions - end - - def recommendation_actions=(str_) - end - - def min_severity - end - - def min_severity=(str_) - end - - def max_severity - end - - def max_severity=(str_) - end - - def after_date - end - - def after_date=(str_) - end - - def before_date - end - - def before_date=(str_) - end - - def within - end - - def within=(str_) - end - - def within_unit - end - - def within_unit=(str_) - end - - def clear_date_window - end - - def clear_date_window=(str_) - end - - def author_id - end - - def author_id=(str_) - end - - def content_id - end - - def content_id=(str_) - end - - def conversation_ids - end - - def conversation_ids=(str_) - end - - def search - end - - def search=(str_) - end - - def check_status - end - - def check_status=(str_) - end -end diff --git a/lib/moderation_api/models/operations/filterlabel.rb b/lib/moderation_api/models/operations/filterlabel.rb deleted file mode 100644 index 20fc0d53..00000000 --- a/lib/moderation_api/models/operations/filterlabel.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - - class FilterLabel - extend T::Sig - include Crystalline::MetadataFields - - field( - :label, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("label"), required: true}} - ) - - field( - :type, - Models::Operations::GetQueueType, - { - 'format_json': { - 'letter_case': ::ModerationApi::Utils.field_name("type"), - required: true, - 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::GetQueueType, false) - } - } - ) - - field( - :min_threshold, - Crystalline::Nilable.new(::Float), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("minThreshold")}} - ) - - field( - :max_threshold, - Crystalline::Nilable.new(::Float), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("maxThreshold")}} - ) - - sig { - params( - label: ::String, - type: Models::Operations::GetQueueType, - min_threshold: T.nilable(::Float), - max_threshold: T.nilable(::Float) - ) - .void - } - def initialize(label:, type:, min_threshold: nil, max_threshold: nil) - @label = label - @type = type - @min_threshold = min_threshold - @max_threshold = max_threshold - end - - sig { params(other: T.untyped).returns(T::Boolean) } - def ==(other) - return false unless other.is_a?(self.class) - return false unless @label == other.label - return false unless @type == other.type - return false unless @min_threshold == other.min_threshold - return false unless @max_threshold == other.max_threshold - true - end - end - end - end -end diff --git a/lib/moderation_api/models/operations/filterlabel.rbi b/lib/moderation_api/models/operations/filterlabel.rbi deleted file mode 100644 index a2751b40..00000000 --- a/lib/moderation_api/models/operations/filterlabel.rbi +++ /dev/null @@ -1,32 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::FilterLabel - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::FilterLabel - def label - end - - def label=(str_) - end - - def type - end - - def type=(str_) - end - - def min_threshold - end - - def min_threshold=(str_) - end - - def max_threshold - end - - def max_threshold=(str_) - end -end diff --git a/lib/moderation_api/models/operations/flaggedcontenttrend.rbi b/lib/moderation_api/models/operations/flaggedcontenttrend.rbi deleted file mode 100644 index 9e856368..00000000 --- a/lib/moderation_api/models/operations/flaggedcontenttrend.rbi +++ /dev/null @@ -1,20 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::FlaggedContentTrend - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::FlaggedContentTrend - def label - end - - def label=(str_) - end - - def trend - end - - def trend=(str_) - end -end diff --git a/lib/moderation_api/models/operations/flagratespike.rb b/lib/moderation_api/models/operations/flagratespike.rb new file mode 100644 index 00000000..77a709fd --- /dev/null +++ b/lib/moderation_api/models/operations/flagratespike.rb @@ -0,0 +1,76 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class FlagRateSpike + extend T::Sig + include Crystalline::MetadataFields + + # How many times higher the recent flag rate is than the baseline, for example 2.4. + field( + :multiple, + ::Float, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("multiple"), required: true}} + ) + # The flag rate in the last 2 days. + field( + :recent_flag_rate, + ::Float, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("recentFlagRate"), required: true}} + ) + # The flag rate in the 30 days before that. + field( + :baseline_flag_rate, + ::Float, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("baselineFlagRate"), required: true}} + ) + # Flagged requests in the last 2 days. + field( + :recent_flagged, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("recentFlagged"), required: true}} + ) + # Requests in the last 2 days. + field( + :recent_requests, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("recentRequests"), required: true}} + ) + + sig { + params( + multiple: ::Float, + recent_flag_rate: ::Float, + baseline_flag_rate: ::Float, + recent_flagged: ::Integer, + recent_requests: ::Integer + ) + .void + } + def initialize(multiple:, recent_flag_rate:, baseline_flag_rate:, recent_flagged:, recent_requests:) + @multiple = multiple + @recent_flag_rate = recent_flag_rate + @baseline_flag_rate = baseline_flag_rate + @recent_flagged = recent_flagged + @recent_requests = recent_requests + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @multiple == other.multiple + return false unless @recent_flag_rate == other.recent_flag_rate + return false unless @baseline_flag_rate == other.baseline_flag_rate + return false unless @recent_flagged == other.recent_flagged + return false unless @recent_requests == other.recent_requests + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/flagratespike.rbi b/lib/moderation_api/models/operations/flagratespike.rbi new file mode 100644 index 00000000..6533f40a --- /dev/null +++ b/lib/moderation_api/models/operations/flagratespike.rbi @@ -0,0 +1,38 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::FlagRateSpike + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::FlagRateSpike + def multiple + end + + def multiple=(str_) + end + + def recent_flag_rate + end + + def recent_flag_rate=(str_) + end + + def baseline_flag_rate + end + + def baseline_flag_rate=(str_) + end + + def recent_flagged + end + + def recent_flagged=(str_) + end + + def recent_requests + end + + def recent_requests=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getaccount_request.rb b/lib/moderation_api/models/operations/getaccount_request.rb index 00689803..4c4c1a1e 100644 --- a/lib/moderation_api/models/operations/getaccount_request.rb +++ b/lib/moderation_api/models/operations/getaccount_request.rb @@ -11,7 +11,7 @@ class GetAccountRequest extend T::Sig include Crystalline::MetadataFields - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/getaction_request.rb b/lib/moderation_api/models/operations/getaction_request.rb index 4cc0b101..0a4312a4 100644 --- a/lib/moderation_api/models/operations/getaction_request.rb +++ b/lib/moderation_api/models/operations/getaction_request.rb @@ -13,7 +13,7 @@ class GetActionRequest # The ID of the action to get. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_author.rb b/lib/moderation_api/models/operations/getanalyticsauthors_author.rb new file mode 100644 index 00000000..f7c853ef --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_author.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsAuthorsAuthor + extend T::Sig + include Crystalline::MetadataFields + + # The author ID from your system. Use it with the authors endpoints. + field( + :author_id, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authorId"), required: true}} + ) + # Flagged requests from this author in the window. + field( + :flagged, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagged"), required: true}} + ) + # The author name, if known. + field( + :name, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} + ) + + sig { params(author_id: ::String, flagged: ::Integer, name: T.nilable(::String)).void } + def initialize(author_id:, flagged:, name: nil) + @author_id = author_id + @flagged = flagged + @name = name + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @author_id == other.author_id + return false unless @flagged == other.flagged + return false unless @name == other.name + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_author.rbi b/lib/moderation_api/models/operations/getanalyticsauthors_author.rbi new file mode 100644 index 00000000..7ff53999 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_author.rbi @@ -0,0 +1,26 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsAuthor + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsAuthor + def author_id + end + + def author_id=(str_) + end + + def flagged + end + + def flagged=(str_) + end + + def name + end + + def name=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_queryparam_range.rb b/lib/moderation_api/models/operations/getanalyticsauthors_queryparam_range.rb new file mode 100644 index 00000000..fade9e1c --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_queryparam_range.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsAuthorsQueryParamRange - The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + class GetAnalyticsAuthorsQueryParamRange < T::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_queryparam_range.rbi b/lib/moderation_api/models/operations/getanalyticsauthors_queryparam_range.rbi new file mode 100644 index 00000000..ea85b537 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_queryparam_range.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsQueryParamRange + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsQueryParamRange +end diff --git a/lib/moderation_api/models/operations/casebookanswer.rb b/lib/moderation_api/models/operations/getanalyticsauthors_range_response.rb similarity index 53% rename from lib/moderation_api/models/operations/casebookanswer.rb rename to lib/moderation_api/models/operations/getanalyticsauthors_range_response.rb index 1466a606..ab142f56 100644 --- a/lib/moderation_api/models/operations/casebookanswer.rb +++ b/lib/moderation_api/models/operations/getanalyticsauthors_range_response.rb @@ -6,14 +6,14 @@ module ModerationApi module Models module Operations - - class CasebookAnswer + # GetAnalyticsAuthorsRangeResponse - The time window of the numbers. + class GetAnalyticsAuthorsRangeResponse include ::Crystalline::Enum enums do - ALL = new("ALL") - ALLOWED = new("ALLOWED") - REJECTED = new("REJECTED") - NO_ANSWER = new("NO_ANSWER") + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") end open! diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_range_response.rbi b/lib/moderation_api/models/operations/getanalyticsauthors_range_response.rbi new file mode 100644 index 00000000..9e68fc13 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_range_response.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsRangeResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsRangeResponse +end diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_request.rb b/lib/moderation_api/models/operations/getanalyticsauthors_request.rb new file mode 100644 index 00000000..8a504b79 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_request.rb @@ -0,0 +1,71 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsAuthorsRequest + extend T::Sig + include Crystalline::MetadataFields + + field( + :channel, + Crystalline::Nilable.new(::String), + {'query_param': {'field_name': "channel", 'style': "form", 'explode': true}} + ) + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + # The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + field( + :range, + Crystalline::Nilable.new(Models::Operations::GetAnalyticsAuthorsQueryParamRange), + {'query_param': {'field_name': "range", 'style': "form", 'explode': true}} + ) + + field( + :limit, + Crystalline::Nilable.new(::Integer), + {'query_param': {'field_name': "limit", 'style': "form", 'explode': true}} + ) + + sig { + params( + channel: T.nilable(::String), + project_id: T.nilable(::String), + range: T.nilable(Models::Operations::GetAnalyticsAuthorsQueryParamRange), + limit: T.nilable(::Integer) + ) + .void + } + def initialize( + channel: nil, + project_id: nil, + range: Models::Operations::GetAnalyticsAuthorsQueryParamRange::THIRTYD, + limit: 6 + ) + @channel = channel + @project_id = project_id + @range = range + @limit = limit + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @channel == other.channel + return false unless @project_id == other.project_id + return false unless @range == other.range + return false unless @limit == other.limit + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_request.rbi b/lib/moderation_api/models/operations/getanalyticsauthors_request.rbi new file mode 100644 index 00000000..b4c08f9e --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_request.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsRequest + def channel + end + + def channel=(str_) + end + + def project_id + end + + def project_id=(str_) + end + + def range + end + + def range=(str_) + end + + def limit + end + + def limit=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_response.rb b/lib/moderation_api/models/operations/getanalyticsauthors_response.rb new file mode 100644 index 00000000..d8c0b785 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_response.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsAuthorsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # Successful response + field :object, Crystalline::Nilable.new(Models::Operations::GetAnalyticsAuthorsResponseBody) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + object: T.nilable(Models::Operations::GetAnalyticsAuthorsResponseBody) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, object: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @object = object + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_response.rbi b/lib/moderation_api/models/operations/getanalyticsauthors_response.rbi new file mode 100644 index 00000000..4eeddf59 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def object + end + + def object=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_responsebody.rb b/lib/moderation_api/models/operations/getanalyticsauthors_responsebody.rb new file mode 100644 index 00000000..a632b636 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_responsebody.rb @@ -0,0 +1,67 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Successful response + class GetAnalyticsAuthorsResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # The time window of the numbers. + field( + :range, + Models::Operations::GetAnalyticsAuthorsRangeResponse, + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("range"), + required: true, + 'decoder': ::ModerationApi::Utils.open_enum_from_string( + Models::Operations::GetAnalyticsAuthorsRangeResponse, + false + ) + } + } + ) + # The authors with the most flagged requests, largest first. Requests without an author are not included. + field( + :authors, + Crystalline::Array.new(Models::Operations::GetAnalyticsAuthorsAuthor), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authors"), required: true}} + ) + # The channel the numbers are for. Null when they are for all channels. + field( + :channel_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("channelId"), required: true}} + ) + + sig { + params( + range: Models::Operations::GetAnalyticsAuthorsRangeResponse, + authors: T::Array[Models::Operations::GetAnalyticsAuthorsAuthor], + channel_id: T.nilable(::String) + ) + .void + } + def initialize(range:, authors:, channel_id: nil) + @range = range + @authors = authors + @channel_id = channel_id + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @range == other.range + return false unless @authors == other.authors + return false unless @channel_id == other.channel_id + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsauthors_responsebody.rbi b/lib/moderation_api/models/operations/getanalyticsauthors_responsebody.rbi new file mode 100644 index 00000000..53521b39 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsauthors_responsebody.rbi @@ -0,0 +1,26 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsResponseBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAuthorsResponseBody + def range + end + + def range=(str_) + end + + def authors + end + + def authors=(str_) + end + + def channel_id + end + + def channel_id=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsautomation_queryparam_range.rb b/lib/moderation_api/models/operations/getanalyticsautomation_queryparam_range.rb new file mode 100644 index 00000000..b4525094 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsautomation_queryparam_range.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsAutomationQueryParamRange - The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + class GetAnalyticsAutomationQueryParamRange < T::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsautomation_queryparam_range.rbi b/lib/moderation_api/models/operations/getanalyticsautomation_queryparam_range.rbi new file mode 100644 index 00000000..6240ceea --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsautomation_queryparam_range.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAutomationQueryParamRange + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAutomationQueryParamRange +end diff --git a/lib/moderation_api/models/operations/getanalyticsautomation_range_response.rb b/lib/moderation_api/models/operations/getanalyticsautomation_range_response.rb new file mode 100644 index 00000000..92c7bb20 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsautomation_range_response.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsAutomationRangeResponse - The time window of the numbers. + class GetAnalyticsAutomationRangeResponse + include ::Crystalline::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + + open! + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsautomation_range_response.rbi b/lib/moderation_api/models/operations/getanalyticsautomation_range_response.rbi new file mode 100644 index 00000000..be249eae --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsautomation_range_response.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAutomationRangeResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAutomationRangeResponse +end diff --git a/lib/moderation_api/models/operations/getanalyticsautomation_request.rb b/lib/moderation_api/models/operations/getanalyticsautomation_request.rb new file mode 100644 index 00000000..6d39ba28 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsautomation_request.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsAutomationRequest + extend T::Sig + include Crystalline::MetadataFields + + field( + :channel, + Crystalline::Nilable.new(::String), + {'query_param': {'field_name': "channel", 'style': "form", 'explode': true}} + ) + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + # The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + field( + :range, + Crystalline::Nilable.new(Models::Operations::GetAnalyticsAutomationQueryParamRange), + {'query_param': {'field_name': "range", 'style': "form", 'explode': true}} + ) + + sig { + params( + channel: T.nilable(::String), + project_id: T.nilable(::String), + range: T.nilable(Models::Operations::GetAnalyticsAutomationQueryParamRange) + ) + .void + } + def initialize( + channel: nil, + project_id: nil, + range: Models::Operations::GetAnalyticsAutomationQueryParamRange::THIRTYD + ) + @channel = channel + @project_id = project_id + @range = range + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @channel == other.channel + return false unless @project_id == other.project_id + return false unless @range == other.range + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsautomation_request.rbi b/lib/moderation_api/models/operations/getanalyticsautomation_request.rbi new file mode 100644 index 00000000..b5880129 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsautomation_request.rbi @@ -0,0 +1,26 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAutomationRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAutomationRequest + def channel + end + + def channel=(str_) + end + + def project_id + end + + def project_id=(str_) + end + + def range + end + + def range=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsautomation_response.rb b/lib/moderation_api/models/operations/getanalyticsautomation_response.rb new file mode 100644 index 00000000..e5fdceb7 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsautomation_response.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsAutomationResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # Successful response + field :object, Crystalline::Nilable.new(Models::Operations::GetAnalyticsAutomationResponseBody) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + object: T.nilable(Models::Operations::GetAnalyticsAutomationResponseBody) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, object: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @object = object + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsautomation_response.rbi b/lib/moderation_api/models/operations/getanalyticsautomation_response.rbi new file mode 100644 index 00000000..f0dc455e --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsautomation_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAutomationResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAutomationResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def object + end + + def object=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsautomation_responsebody.rb b/lib/moderation_api/models/operations/getanalyticsautomation_responsebody.rb new file mode 100644 index 00000000..89dd5a65 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsautomation_responsebody.rb @@ -0,0 +1,186 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Successful response + class GetAnalyticsAutomationResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # The time window of the numbers. + field( + :range, + Models::Operations::GetAnalyticsAutomationRangeResponse, + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("range"), + required: true, + 'decoder': ::ModerationApi::Utils.open_enum_from_string( + Models::Operations::GetAnalyticsAutomationRangeResponse, + false + ) + } + } + ) + # Flagged requests in the window. Counted on a rolling window from the raw requests, so it can be a little different from the summary. + field( + :flagged, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagged"), required: true}} + ) + # Flagged requests that a rule allowed or rejected without human review. + field( + :handled_by_rules, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("handledByRules"), required: true}} + ) + # Flagged requests that the casebook settled without human review. + field( + :handled_by_casebook, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("handledByCasebook"), required: true}} + ) + # Distinct content items sent to the review queue. Repeats of the same content count once, as in the queue. + field( + :sent_to_review, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("sentToReview"), required: true}} + ) + # Flagged requests that the review queue merged into an item it already shows: repeats, edits and content that was settled later. + field( + :merged_duplicates, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("mergedDuplicates"), required: true}} + ) + # Review queue items from this window that a moderator allowed. + field( + :reviews_allowed, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("reviewsAllowed"), required: true}} + ) + # Review queue items from this window that a moderator rejected. + field( + :reviews_rejected, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("reviewsRejected"), required: true}} + ) + # Review queue items from this window that a moderator marked as done without allow or reject. + field( + :reviews_resolved_without_decision, + ::Integer, + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("reviewsResolvedWithoutDecision"), + required: true + } + } + ) + # Review queue items from this window that are still open. + field( + :reviews_unresolved, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("reviewsUnresolved"), required: true}} + ) + # Requests where the casebook decision was different from the decision based on severity. + field( + :casebook_overrulings, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("casebookOverrulings"), required: true}} + ) + # The rules that settled flagged requests without review, largest first. The 5 largest have their own entry. The casebook is one of the rules. + field( + :rules, + Crystalline::Array.new(Models::Operations::Rule), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("rules"), required: true}} + ) + # The channel the numbers are for. Null when they are for all channels. + field( + :channel_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("channelId"), required: true}} + ) + + field( + :automation_rate, + Crystalline::Nilable.new(::Float), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("automationRate"), required: true}} + ) + + sig { + params( + range: Models::Operations::GetAnalyticsAutomationRangeResponse, + flagged: ::Integer, + handled_by_rules: ::Integer, + handled_by_casebook: ::Integer, + sent_to_review: ::Integer, + merged_duplicates: ::Integer, + reviews_allowed: ::Integer, + reviews_rejected: ::Integer, + reviews_resolved_without_decision: ::Integer, + reviews_unresolved: ::Integer, + casebook_overrulings: ::Integer, + rules: T::Array[Models::Operations::Rule], + channel_id: T.nilable(::String), + automation_rate: T.nilable(::Float) + ) + .void + } + def initialize( + range:, + flagged:, + handled_by_rules:, + handled_by_casebook:, + sent_to_review:, + merged_duplicates:, + reviews_allowed:, + reviews_rejected:, + reviews_resolved_without_decision:, + reviews_unresolved:, + casebook_overrulings:, + rules:, + channel_id: nil, + automation_rate: nil + ) + @range = range + @flagged = flagged + @handled_by_rules = handled_by_rules + @handled_by_casebook = handled_by_casebook + @sent_to_review = sent_to_review + @merged_duplicates = merged_duplicates + @reviews_allowed = reviews_allowed + @reviews_rejected = reviews_rejected + @reviews_resolved_without_decision = reviews_resolved_without_decision + @reviews_unresolved = reviews_unresolved + @casebook_overrulings = casebook_overrulings + @rules = rules + @channel_id = channel_id + @automation_rate = automation_rate + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @range == other.range + return false unless @flagged == other.flagged + return false unless @handled_by_rules == other.handled_by_rules + return false unless @handled_by_casebook == other.handled_by_casebook + return false unless @sent_to_review == other.sent_to_review + return false unless @merged_duplicates == other.merged_duplicates + return false unless @reviews_allowed == other.reviews_allowed + return false unless @reviews_rejected == other.reviews_rejected + return false unless @reviews_resolved_without_decision == other.reviews_resolved_without_decision + return false unless @reviews_unresolved == other.reviews_unresolved + return false unless @casebook_overrulings == other.casebook_overrulings + return false unless @rules == other.rules + return false unless @channel_id == other.channel_id + return false unless @automation_rate == other.automation_rate + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsautomation_responsebody.rbi b/lib/moderation_api/models/operations/getanalyticsautomation_responsebody.rbi new file mode 100644 index 00000000..36e920db --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsautomation_responsebody.rbi @@ -0,0 +1,92 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsAutomationResponseBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsAutomationResponseBody + def range + end + + def range=(str_) + end + + def flagged + end + + def flagged=(str_) + end + + def handled_by_rules + end + + def handled_by_rules=(str_) + end + + def handled_by_casebook + end + + def handled_by_casebook=(str_) + end + + def sent_to_review + end + + def sent_to_review=(str_) + end + + def merged_duplicates + end + + def merged_duplicates=(str_) + end + + def reviews_allowed + end + + def reviews_allowed=(str_) + end + + def reviews_rejected + end + + def reviews_rejected=(str_) + end + + def reviews_resolved_without_decision + end + + def reviews_resolved_without_decision=(str_) + end + + def reviews_unresolved + end + + def reviews_unresolved=(str_) + end + + def casebook_overrulings + end + + def casebook_overrulings=(str_) + end + + def rules + end + + def rules=(str_) + end + + def channel_id + end + + def channel_id=(str_) + end + + def automation_rate + end + + def automation_rate=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticschannels_queryparam_range.rb b/lib/moderation_api/models/operations/getanalyticschannels_queryparam_range.rb new file mode 100644 index 00000000..4cfd5067 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticschannels_queryparam_range.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsChannelsQueryParamRange - The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + class GetAnalyticsChannelsQueryParamRange < T::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticschannels_queryparam_range.rbi b/lib/moderation_api/models/operations/getanalyticschannels_queryparam_range.rbi new file mode 100644 index 00000000..8e15c78e --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticschannels_queryparam_range.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsChannelsQueryParamRange + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsChannelsQueryParamRange +end diff --git a/lib/moderation_api/models/operations/getanalyticschannels_range_response.rb b/lib/moderation_api/models/operations/getanalyticschannels_range_response.rb new file mode 100644 index 00000000..70243287 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticschannels_range_response.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsChannelsRangeResponse - The time window of the numbers. + class GetAnalyticsChannelsRangeResponse + include ::Crystalline::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + + open! + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticschannels_range_response.rbi b/lib/moderation_api/models/operations/getanalyticschannels_range_response.rbi new file mode 100644 index 00000000..364f6f99 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticschannels_range_response.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsChannelsRangeResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsChannelsRangeResponse +end diff --git a/lib/moderation_api/models/operations/getanalyticschannels_request.rb b/lib/moderation_api/models/operations/getanalyticschannels_request.rb new file mode 100644 index 00000000..a7532647 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticschannels_request.rb @@ -0,0 +1,49 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsChannelsRequest + extend T::Sig + include Crystalline::MetadataFields + + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + # The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + field( + :range, + Crystalline::Nilable.new(Models::Operations::GetAnalyticsChannelsQueryParamRange), + {'query_param': {'field_name': "range", 'style': "form", 'explode': true}} + ) + + sig { + params( + project_id: T.nilable(::String), + range: T.nilable(Models::Operations::GetAnalyticsChannelsQueryParamRange) + ) + .void + } + def initialize(project_id: nil, range: Models::Operations::GetAnalyticsChannelsQueryParamRange::THIRTYD) + @project_id = project_id + @range = range + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @project_id == other.project_id + return false unless @range == other.range + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticschannels_request.rbi b/lib/moderation_api/models/operations/getanalyticschannels_request.rbi new file mode 100644 index 00000000..ac4b0a77 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticschannels_request.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsChannelsRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsChannelsRequest + def project_id + end + + def project_id=(str_) + end + + def range + end + + def range=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticschannels_response.rb b/lib/moderation_api/models/operations/getanalyticschannels_response.rb new file mode 100644 index 00000000..e2a55efd --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticschannels_response.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsChannelsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # Successful response + field :object, Crystalline::Nilable.new(Models::Operations::GetAnalyticsChannelsResponseBody) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + object: T.nilable(Models::Operations::GetAnalyticsChannelsResponseBody) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, object: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @object = object + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticschannels_response.rbi b/lib/moderation_api/models/operations/getanalyticschannels_response.rbi new file mode 100644 index 00000000..349e6d70 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticschannels_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsChannelsResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsChannelsResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def object + end + + def object=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticschannels_responsebody.rb b/lib/moderation_api/models/operations/getanalyticschannels_responsebody.rb new file mode 100644 index 00000000..60dfaa19 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticschannels_responsebody.rb @@ -0,0 +1,58 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Successful response + class GetAnalyticsChannelsResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # The time window of the numbers. + field( + :range, + Models::Operations::GetAnalyticsChannelsRangeResponse, + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("range"), + required: true, + 'decoder': ::ModerationApi::Utils.open_enum_from_string( + Models::Operations::GetAnalyticsChannelsRangeResponse, + false + ) + } + } + ) + # Requests and flags per channel. Channels with no requests in the window are not included. + field( + :channels, + Crystalline::Array.new(Models::Operations::Channel), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("channels"), required: true}} + ) + + sig { + params( + range: Models::Operations::GetAnalyticsChannelsRangeResponse, + channels: T::Array[Models::Operations::Channel] + ) + .void + } + def initialize(range:, channels:) + @range = range + @channels = channels + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @range == other.range + return false unless @channels == other.channels + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticschannels_responsebody.rbi b/lib/moderation_api/models/operations/getanalyticschannels_responsebody.rbi new file mode 100644 index 00000000..23d81da1 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticschannels_responsebody.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsChannelsResponseBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsChannelsResponseBody + def range + end + + def range=(str_) + end + + def channels + end + + def channels=(str_) + end +end diff --git a/lib/moderation_api/models/operations/listqueueitems_label.rb b/lib/moderation_api/models/operations/getanalyticspolicies_policy.rb similarity index 60% rename from lib/moderation_api/models/operations/listqueueitems_label.rb rename to lib/moderation_api/models/operations/getanalyticspolicies_policy.rb index 80f85828..c95ba1d4 100644 --- a/lib/moderation_api/models/operations/listqueueitems_label.rb +++ b/lib/moderation_api/models/operations/getanalyticspolicies_policy.rb @@ -7,42 +7,42 @@ module ModerationApi module Models module Operations - class ListQueueItemsLabel + class GetAnalyticsPoliciesPolicy extend T::Sig include Crystalline::MetadataFields - # Label name + # The policy label, for example `toxicity`. field( :label, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("label"), required: true}} ) - # Confidence score of the label - field( - :score, - ::Float, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("score"), required: true}} - ) - # Whether this label caused a flag + # Flagged requests with this label in the window. Repeats count each time. field( :flagged, - Crystalline::Boolean.new, + ::Integer, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagged"), required: true}} ) + # Flagged requests with this label in the window of equal length before. + field( + :previous_flagged, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("previousFlagged"), required: true}} + ) - sig { params(label: ::String, score: ::Float, flagged: T::Boolean).void } - def initialize(label:, score:, flagged:) + sig { params(label: ::String, flagged: ::Integer, previous_flagged: ::Integer).void } + def initialize(label:, flagged:, previous_flagged:) @label = label - @score = score @flagged = flagged + @previous_flagged = previous_flagged end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @label == other.label - return false unless @score == other.score return false unless @flagged == other.flagged + return false unless @previous_flagged == other.previous_flagged true end end diff --git a/lib/moderation_api/models/operations/listqueueitems_label.rbi b/lib/moderation_api/models/operations/getanalyticspolicies_policy.rbi similarity index 53% rename from lib/moderation_api/models/operations/listqueueitems_label.rbi rename to lib/moderation_api/models/operations/getanalyticspolicies_policy.rbi index 27cbb2c5..07e8dc58 100644 --- a/lib/moderation_api/models/operations/listqueueitems_label.rbi +++ b/lib/moderation_api/models/operations/getanalyticspolicies_policy.rbi @@ -1,26 +1,26 @@ # typed: true # frozen_string_literal: true -class ModerationApi::Models::Operations::ListQueueItemsLabel +class ModerationApi::Models::Operations::GetAnalyticsPoliciesPolicy extend ::Crystalline::MetadataFields::ClassMethods end -class ModerationApi::Models::Operations::ListQueueItemsLabel +class ModerationApi::Models::Operations::GetAnalyticsPoliciesPolicy def label end def label=(str_) end - def score + def flagged end - def score=(str_) + def flagged=(str_) end - def flagged + def previous_flagged end - def flagged=(str_) + def previous_flagged=(str_) end end diff --git a/lib/moderation_api/models/operations/getanalyticspolicies_queryparam_range.rb b/lib/moderation_api/models/operations/getanalyticspolicies_queryparam_range.rb new file mode 100644 index 00000000..f5d2e97d --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticspolicies_queryparam_range.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsPoliciesQueryParamRange - The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + class GetAnalyticsPoliciesQueryParamRange < T::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticspolicies_queryparam_range.rbi b/lib/moderation_api/models/operations/getanalyticspolicies_queryparam_range.rbi new file mode 100644 index 00000000..ab0c272a --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticspolicies_queryparam_range.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsPoliciesQueryParamRange + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsPoliciesQueryParamRange +end diff --git a/lib/moderation_api/models/operations/getanalyticspolicies_range_response.rb b/lib/moderation_api/models/operations/getanalyticspolicies_range_response.rb new file mode 100644 index 00000000..4a3473fc --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticspolicies_range_response.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsPoliciesRangeResponse - The time window of the numbers. + class GetAnalyticsPoliciesRangeResponse + include ::Crystalline::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + + open! + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticspolicies_range_response.rbi b/lib/moderation_api/models/operations/getanalyticspolicies_range_response.rbi new file mode 100644 index 00000000..098613a8 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticspolicies_range_response.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsPoliciesRangeResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsPoliciesRangeResponse +end diff --git a/lib/moderation_api/models/operations/getanalyticspolicies_request.rb b/lib/moderation_api/models/operations/getanalyticspolicies_request.rb new file mode 100644 index 00000000..a3155737 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticspolicies_request.rb @@ -0,0 +1,71 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsPoliciesRequest + extend T::Sig + include Crystalline::MetadataFields + + field( + :channel, + Crystalline::Nilable.new(::String), + {'query_param': {'field_name': "channel", 'style': "form", 'explode': true}} + ) + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + # The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + field( + :range, + Crystalline::Nilable.new(Models::Operations::GetAnalyticsPoliciesQueryParamRange), + {'query_param': {'field_name': "range", 'style': "form", 'explode': true}} + ) + + field( + :limit, + Crystalline::Nilable.new(::Integer), + {'query_param': {'field_name': "limit", 'style': "form", 'explode': true}} + ) + + sig { + params( + channel: T.nilable(::String), + project_id: T.nilable(::String), + range: T.nilable(Models::Operations::GetAnalyticsPoliciesQueryParamRange), + limit: T.nilable(::Integer) + ) + .void + } + def initialize( + channel: nil, + project_id: nil, + range: Models::Operations::GetAnalyticsPoliciesQueryParamRange::THIRTYD, + limit: 8 + ) + @channel = channel + @project_id = project_id + @range = range + @limit = limit + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @channel == other.channel + return false unless @project_id == other.project_id + return false unless @range == other.range + return false unless @limit == other.limit + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticspolicies_request.rbi b/lib/moderation_api/models/operations/getanalyticspolicies_request.rbi new file mode 100644 index 00000000..9c6bf3d4 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticspolicies_request.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsPoliciesRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsPoliciesRequest + def channel + end + + def channel=(str_) + end + + def project_id + end + + def project_id=(str_) + end + + def range + end + + def range=(str_) + end + + def limit + end + + def limit=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticspolicies_response.rb b/lib/moderation_api/models/operations/getanalyticspolicies_response.rb new file mode 100644 index 00000000..4eebfda9 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticspolicies_response.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsPoliciesResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # Successful response + field :object, Crystalline::Nilable.new(Models::Operations::GetAnalyticsPoliciesResponseBody) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + object: T.nilable(Models::Operations::GetAnalyticsPoliciesResponseBody) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, object: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @object = object + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticspolicies_response.rbi b/lib/moderation_api/models/operations/getanalyticspolicies_response.rbi new file mode 100644 index 00000000..4070be73 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticspolicies_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsPoliciesResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsPoliciesResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def object + end + + def object=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticspolicies_responsebody.rb b/lib/moderation_api/models/operations/getanalyticspolicies_responsebody.rb new file mode 100644 index 00000000..c4355846 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticspolicies_responsebody.rb @@ -0,0 +1,67 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Successful response + class GetAnalyticsPoliciesResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # The time window of the numbers. + field( + :range, + Models::Operations::GetAnalyticsPoliciesRangeResponse, + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("range"), + required: true, + 'decoder': ::ModerationApi::Utils.open_enum_from_string( + Models::Operations::GetAnalyticsPoliciesRangeResponse, + false + ) + } + } + ) + # The policy labels with the most flagged requests, largest first. + field( + :policies, + Crystalline::Array.new(Models::Operations::GetAnalyticsPoliciesPolicy), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("policies"), required: true}} + ) + # The channel the numbers are for. Null when they are for all channels. + field( + :channel_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("channelId"), required: true}} + ) + + sig { + params( + range: Models::Operations::GetAnalyticsPoliciesRangeResponse, + policies: T::Array[Models::Operations::GetAnalyticsPoliciesPolicy], + channel_id: T.nilable(::String) + ) + .void + } + def initialize(range:, policies:, channel_id: nil) + @range = range + @policies = policies + @channel_id = channel_id + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @range == other.range + return false unless @policies == other.policies + return false unless @channel_id == other.channel_id + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticspolicies_responsebody.rbi b/lib/moderation_api/models/operations/getanalyticspolicies_responsebody.rbi new file mode 100644 index 00000000..1a60ddfa --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticspolicies_responsebody.rbi @@ -0,0 +1,26 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsPoliciesResponseBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsPoliciesResponseBody + def range + end + + def range=(str_) + end + + def policies + end + + def policies=(str_) + end + + def channel_id + end + + def channel_id=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticssummary_queryparam_range.rb b/lib/moderation_api/models/operations/getanalyticssummary_queryparam_range.rb new file mode 100644 index 00000000..48dd35d6 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticssummary_queryparam_range.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsSummaryQueryParamRange - The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + class GetAnalyticsSummaryQueryParamRange < T::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticssummary_queryparam_range.rbi b/lib/moderation_api/models/operations/getanalyticssummary_queryparam_range.rbi new file mode 100644 index 00000000..5c36f711 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticssummary_queryparam_range.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsSummaryQueryParamRange + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsSummaryQueryParamRange +end diff --git a/lib/moderation_api/models/operations/getanalyticssummary_range_response.rb b/lib/moderation_api/models/operations/getanalyticssummary_range_response.rb new file mode 100644 index 00000000..2b7e25cd --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticssummary_range_response.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsSummaryRangeResponse - The time window of the numbers. + class GetAnalyticsSummaryRangeResponse + include ::Crystalline::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + + open! + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticssummary_range_response.rbi b/lib/moderation_api/models/operations/getanalyticssummary_range_response.rbi new file mode 100644 index 00000000..062a4c82 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticssummary_range_response.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsSummaryRangeResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsSummaryRangeResponse +end diff --git a/lib/moderation_api/models/operations/getanalyticssummary_request.rb b/lib/moderation_api/models/operations/getanalyticssummary_request.rb new file mode 100644 index 00000000..ea6a33fe --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticssummary_request.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsSummaryRequest + extend T::Sig + include Crystalline::MetadataFields + + field( + :channel, + Crystalline::Nilable.new(::String), + {'query_param': {'field_name': "channel", 'style': "form", 'explode': true}} + ) + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + # The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + field( + :range, + Crystalline::Nilable.new(Models::Operations::GetAnalyticsSummaryQueryParamRange), + {'query_param': {'field_name': "range", 'style': "form", 'explode': true}} + ) + + sig { + params( + channel: T.nilable(::String), + project_id: T.nilable(::String), + range: T.nilable(Models::Operations::GetAnalyticsSummaryQueryParamRange) + ) + .void + } + def initialize( + channel: nil, + project_id: nil, + range: Models::Operations::GetAnalyticsSummaryQueryParamRange::THIRTYD + ) + @channel = channel + @project_id = project_id + @range = range + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @channel == other.channel + return false unless @project_id == other.project_id + return false unless @range == other.range + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticssummary_request.rbi b/lib/moderation_api/models/operations/getanalyticssummary_request.rbi new file mode 100644 index 00000000..78cb592e --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticssummary_request.rbi @@ -0,0 +1,26 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsSummaryRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsSummaryRequest + def channel + end + + def channel=(str_) + end + + def project_id + end + + def project_id=(str_) + end + + def range + end + + def range=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticssummary_response.rb b/lib/moderation_api/models/operations/getanalyticssummary_response.rb new file mode 100644 index 00000000..de374745 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticssummary_response.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsSummaryResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # Successful response + field :object, Crystalline::Nilable.new(Models::Operations::GetAnalyticsSummaryResponseBody) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + object: T.nilable(Models::Operations::GetAnalyticsSummaryResponseBody) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, object: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @object = object + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticssummary_response.rbi b/lib/moderation_api/models/operations/getanalyticssummary_response.rbi new file mode 100644 index 00000000..537b1a28 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticssummary_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsSummaryResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsSummaryResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def object + end + + def object=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticssummary_responsebody.rb b/lib/moderation_api/models/operations/getanalyticssummary_responsebody.rb new file mode 100644 index 00000000..084880c4 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticssummary_responsebody.rb @@ -0,0 +1,94 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Successful response + class GetAnalyticsSummaryResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # The time window of the numbers. + field( + :range, + Models::Operations::GetAnalyticsSummaryRangeResponse, + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("range"), + required: true, + 'decoder': ::ModerationApi::Utils.open_enum_from_string( + Models::Operations::GetAnalyticsSummaryRangeResponse, + false + ) + } + } + ) + # Request counts for the window. A flagged request has one recommendation: allow, reject or review. + field( + :totals, + Models::Operations::Totals, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("totals"), required: true}} + ) + # The same counts for the window of equal length just before this one. Compare with `totals` to see the trend. + field( + :previous_period, + Models::Operations::PreviousPeriod, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("previousPeriod"), required: true}} + ) + # Items in the default review queue that nobody has reviewed yet, counted as the queue counts them (repeats count once). The queue looks back 30 days, so older items are not included. The range does not change it. + field( + :pending_review, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("pendingReview"), required: true}} + ) + # The channel the numbers are for. Null when they are for all channels. + field( + :channel_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("channelId"), required: true}} + ) + # Set when the flag rate of the last 2 days is at least 2 times the rate of the 30 days before, with at least 50 flagged requests. Null when there is no spike. Always for the full project: the range and channel do not change it. + field( + :flag_rate_spike, + Crystalline::Nilable.new(Models::Operations::FlagRateSpike), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagRateSpike"), required: true}} + ) + + sig { + params( + range: Models::Operations::GetAnalyticsSummaryRangeResponse, + totals: Models::Operations::Totals, + previous_period: Models::Operations::PreviousPeriod, + pending_review: ::Integer, + channel_id: T.nilable(::String), + flag_rate_spike: T.nilable(Models::Operations::FlagRateSpike) + ) + .void + } + def initialize(range:, totals:, previous_period:, pending_review:, channel_id: nil, flag_rate_spike: nil) + @range = range + @totals = totals + @previous_period = previous_period + @pending_review = pending_review + @channel_id = channel_id + @flag_rate_spike = flag_rate_spike + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @range == other.range + return false unless @totals == other.totals + return false unless @previous_period == other.previous_period + return false unless @pending_review == other.pending_review + return false unless @channel_id == other.channel_id + return false unless @flag_rate_spike == other.flag_rate_spike + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticssummary_responsebody.rbi b/lib/moderation_api/models/operations/getanalyticssummary_responsebody.rbi new file mode 100644 index 00000000..37a1b835 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticssummary_responsebody.rbi @@ -0,0 +1,44 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsSummaryResponseBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsSummaryResponseBody + def range + end + + def range=(str_) + end + + def totals + end + + def totals=(str_) + end + + def previous_period + end + + def previous_period=(str_) + end + + def pending_review + end + + def pending_review=(str_) + end + + def channel_id + end + + def channel_id=(str_) + end + + def flag_rate_spike + end + + def flag_rate_spike=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsvolumes_queryparam_range.rb b/lib/moderation_api/models/operations/getanalyticsvolumes_queryparam_range.rb new file mode 100644 index 00000000..1ca09ffb --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsvolumes_queryparam_range.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsVolumesQueryParamRange - The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + class GetAnalyticsVolumesQueryParamRange < T::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsvolumes_queryparam_range.rbi b/lib/moderation_api/models/operations/getanalyticsvolumes_queryparam_range.rbi new file mode 100644 index 00000000..07ee2b01 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsvolumes_queryparam_range.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsVolumesQueryParamRange + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsVolumesQueryParamRange +end diff --git a/lib/moderation_api/models/operations/getanalyticsvolumes_range_response.rb b/lib/moderation_api/models/operations/getanalyticsvolumes_range_response.rb new file mode 100644 index 00000000..1f98a5d7 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsvolumes_range_response.rb @@ -0,0 +1,23 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # GetAnalyticsVolumesRangeResponse - The time window of the numbers. + class GetAnalyticsVolumesRangeResponse + include ::Crystalline::Enum + enums do + TWENTY_FOURH = new("24h") + SEVEND = new("7d") + THIRTYD = new("30d") + NINETYD = new("90d") + end + + open! + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsvolumes_range_response.rbi b/lib/moderation_api/models/operations/getanalyticsvolumes_range_response.rbi new file mode 100644 index 00000000..41c5db58 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsvolumes_range_response.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsVolumesRangeResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsVolumesRangeResponse +end diff --git a/lib/moderation_api/models/operations/getanalyticsvolumes_request.rb b/lib/moderation_api/models/operations/getanalyticsvolumes_request.rb new file mode 100644 index 00000000..66b8480e --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsvolumes_request.rb @@ -0,0 +1,61 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsVolumesRequest + extend T::Sig + include Crystalline::MetadataFields + + field( + :channel, + Crystalline::Nilable.new(::String), + {'query_param': {'field_name': "channel", 'style': "form", 'explode': true}} + ) + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + # The time window. `24h` is the last 24 hours, in hourly buckets. `7d`, `30d` and `90d` are whole UTC days that end with today, in daily buckets. + field( + :range, + Crystalline::Nilable.new(Models::Operations::GetAnalyticsVolumesQueryParamRange), + {'query_param': {'field_name': "range", 'style': "form", 'explode': true}} + ) + + sig { + params( + channel: T.nilable(::String), + project_id: T.nilable(::String), + range: T.nilable(Models::Operations::GetAnalyticsVolumesQueryParamRange) + ) + .void + } + def initialize( + channel: nil, + project_id: nil, + range: Models::Operations::GetAnalyticsVolumesQueryParamRange::THIRTYD + ) + @channel = channel + @project_id = project_id + @range = range + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @channel == other.channel + return false unless @project_id == other.project_id + return false unless @range == other.range + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsvolumes_request.rbi b/lib/moderation_api/models/operations/getanalyticsvolumes_request.rbi new file mode 100644 index 00000000..fb383dd3 --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsvolumes_request.rbi @@ -0,0 +1,26 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsVolumesRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsVolumesRequest + def channel + end + + def channel=(str_) + end + + def project_id + end + + def project_id=(str_) + end + + def range + end + + def range=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsvolumes_response.rb b/lib/moderation_api/models/operations/getanalyticsvolumes_response.rb new file mode 100644 index 00000000..1283e5ce --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsvolumes_response.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class GetAnalyticsVolumesResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # Successful response + field :object, Crystalline::Nilable.new(Models::Operations::GetAnalyticsVolumesResponseBody) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + object: T.nilable(Models::Operations::GetAnalyticsVolumesResponseBody) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, object: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @object = object + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsvolumes_response.rbi b/lib/moderation_api/models/operations/getanalyticsvolumes_response.rbi new file mode 100644 index 00000000..6dfc9f0a --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsvolumes_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsVolumesResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsVolumesResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def object + end + + def object=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsvolumes_responsebody.rb b/lib/moderation_api/models/operations/getanalyticsvolumes_responsebody.rb new file mode 100644 index 00000000..7cbf2cdf --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsvolumes_responsebody.rb @@ -0,0 +1,82 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Successful response + class GetAnalyticsVolumesResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # The time window of the numbers. + field( + :range, + Models::Operations::GetAnalyticsVolumesRangeResponse, + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("range"), + required: true, + 'decoder': ::ModerationApi::Utils.open_enum_from_string( + Models::Operations::GetAnalyticsVolumesRangeResponse, + false + ) + } + } + ) + # The size of each entry in `volumes`. + field( + :bucket, + Models::Operations::Bucket, + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("bucket"), + required: true, + 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::Bucket, false) + } + } + ) + # Counts over time, oldest first. Buckets with no requests are included with zeros. + field( + :volumes, + Crystalline::Array.new(Models::Operations::Volume), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("volumes"), required: true}} + ) + # The channel the numbers are for. Null when they are for all channels. + field( + :channel_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("channelId"), required: true}} + ) + + sig { + params( + range: Models::Operations::GetAnalyticsVolumesRangeResponse, + bucket: Models::Operations::Bucket, + volumes: T::Array[Models::Operations::Volume], + channel_id: T.nilable(::String) + ) + .void + } + def initialize(range:, bucket:, volumes:, channel_id: nil) + @range = range + @bucket = bucket + @volumes = volumes + @channel_id = channel_id + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @range == other.range + return false unless @bucket == other.bucket + return false unless @volumes == other.volumes + return false unless @channel_id == other.channel_id + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/getanalyticsvolumes_responsebody.rbi b/lib/moderation_api/models/operations/getanalyticsvolumes_responsebody.rbi new file mode 100644 index 00000000..8bd1550e --- /dev/null +++ b/lib/moderation_api/models/operations/getanalyticsvolumes_responsebody.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::GetAnalyticsVolumesResponseBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::GetAnalyticsVolumesResponseBody + def range + end + + def range=(str_) + end + + def bucket + end + + def bucket=(str_) + end + + def volumes + end + + def volumes=(str_) + end + + def channel_id + end + + def channel_id=(str_) + end +end diff --git a/lib/moderation_api/models/operations/getauthor_request.rb b/lib/moderation_api/models/operations/getauthor_request.rb index 02dbe929..de4b8b3d 100644 --- a/lib/moderation_api/models/operations/getauthor_request.rb +++ b/lib/moderation_api/models/operations/getauthor_request.rb @@ -13,7 +13,7 @@ class GetAuthorRequest # Either external ID or the ID assigned by moderation API. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/getqueue_contenttype.rb b/lib/moderation_api/models/operations/getqueue_contenttype.rb deleted file mode 100644 index d53c31b2..00000000 --- a/lib/moderation_api/models/operations/getqueue_contenttype.rb +++ /dev/null @@ -1,28 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - - class GetQueueContentType - include ::Crystalline::Enum - enums do - PROFILE = new("profile") - MESSAGE = new("message") - POST = new("post") - COMMENT = new("comment") - EVENT = new("event") - PRODUCT = new("product") - REVIEW = new("review") - VOICE = new("voice") - OTHER = new("other") - end - - open! - end - end - end -end diff --git a/lib/moderation_api/models/operations/getqueue_contenttype.rbi b/lib/moderation_api/models/operations/getqueue_contenttype.rbi deleted file mode 100644 index c6f19c2c..00000000 --- a/lib/moderation_api/models/operations/getqueue_contenttype.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::GetQueueContentType - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::GetQueueContentType -end diff --git a/lib/moderation_api/models/operations/getqueue_recommendationaction.rbi b/lib/moderation_api/models/operations/getqueue_recommendationaction.rbi deleted file mode 100644 index 7cfb5c6c..00000000 --- a/lib/moderation_api/models/operations/getqueue_recommendationaction.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::GetQueueRecommendationAction - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::GetQueueRecommendationAction -end diff --git a/lib/moderation_api/models/operations/getqueue_request.rb b/lib/moderation_api/models/operations/getqueue_request.rb index ee676eba..5d3e66a4 100644 --- a/lib/moderation_api/models/operations/getqueue_request.rb +++ b/lib/moderation_api/models/operations/getqueue_request.rb @@ -11,9 +11,9 @@ class GetQueueRequest extend T::Sig include Crystalline::MetadataFields - # The queue ID + # The queue ID. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/getqueue_responsebody.rb b/lib/moderation_api/models/operations/getqueue_responsebody.rb index 16fa080d..e49115fc 100644 --- a/lib/moderation_api/models/operations/getqueue_responsebody.rb +++ b/lib/moderation_api/models/operations/getqueue_responsebody.rb @@ -13,11 +13,11 @@ class GetQueueResponseBody field( :queue, - Models::Operations::Queue, + Models::Components::QueueWithCounts, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("queue"), required: true}} ) - sig { params(queue: Models::Operations::Queue).void } + sig { params(queue: Models::Components::QueueWithCounts).void } def initialize(queue:) @queue = queue end diff --git a/lib/moderation_api/models/operations/getqueue_type.rb b/lib/moderation_api/models/operations/getqueue_type.rb deleted file mode 100644 index 7f80516a..00000000 --- a/lib/moderation_api/models/operations/getqueue_type.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - - class GetQueueType - include ::Crystalline::Enum - enums do - FLAGGED = new("FLAGGED") - NOT_FLAGGED = new("NOT_FLAGGED") - THRESHOLDS = new("THRESHOLDS") - MATCHED = new("MATCHED") - end - - open! - end - end - end -end diff --git a/lib/moderation_api/models/operations/getqueue_type.rbi b/lib/moderation_api/models/operations/getqueue_type.rbi deleted file mode 100644 index 3ed92c2f..00000000 --- a/lib/moderation_api/models/operations/getqueue_type.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::GetQueueType - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::GetQueueType -end diff --git a/lib/moderation_api/models/operations/getqueuestats_request.rb b/lib/moderation_api/models/operations/getqueuestats_request.rb index a76e15b1..c907438b 100644 --- a/lib/moderation_api/models/operations/getqueuestats_request.rb +++ b/lib/moderation_api/models/operations/getqueuestats_request.rb @@ -11,9 +11,9 @@ class GetQueueStatsRequest extend T::Sig include Crystalline::MetadataFields - # The queue ID + # The queue ID. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/getqueuestats_responsebody.rb b/lib/moderation_api/models/operations/getqueuestats_responsebody.rb index b5b1e982..0a59b99d 100644 --- a/lib/moderation_api/models/operations/getqueuestats_responsebody.rb +++ b/lib/moderation_api/models/operations/getqueuestats_responsebody.rb @@ -16,13 +16,7 @@ class GetQueueStatsResponseBody Models::Operations::ReviewStats, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("reviewStats"), required: true}} ) - - field( - :action_stats, - Crystalline::Array.new(Models::Operations::ActionStat), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("actionStats"), required: true}} - ) - # List of top reviewers and their statistics + # Reviewers with the most resolved items, most first. Up to 10. field( :top_reviewers, Crystalline::Array.new(Models::Operations::TopReviewer), @@ -38,15 +32,13 @@ class GetQueueStatsResponseBody sig { params( review_stats: Models::Operations::ReviewStats, - action_stats: T::Array[Models::Operations::ActionStat], top_reviewers: T::Array[Models::Operations::TopReviewer], trends: Models::Operations::Trends ) .void } - def initialize(review_stats:, action_stats:, top_reviewers:, trends:) + def initialize(review_stats:, top_reviewers:, trends:) @review_stats = review_stats - @action_stats = action_stats @top_reviewers = top_reviewers @trends = trends end @@ -55,7 +47,6 @@ def initialize(review_stats:, action_stats:, top_reviewers:, trends:) def ==(other) return false unless other.is_a?(self.class) return false unless @review_stats == other.review_stats - return false unless @action_stats == other.action_stats return false unless @top_reviewers == other.top_reviewers return false unless @trends == other.trends true diff --git a/lib/moderation_api/models/operations/getqueuestats_responsebody.rbi b/lib/moderation_api/models/operations/getqueuestats_responsebody.rbi index dea1e853..508272a8 100644 --- a/lib/moderation_api/models/operations/getqueuestats_responsebody.rbi +++ b/lib/moderation_api/models/operations/getqueuestats_responsebody.rbi @@ -12,12 +12,6 @@ class ModerationApi::Models::Operations::GetQueueStatsResponseBody def review_stats=(str_) end - def action_stats - end - - def action_stats=(str_) - end - def top_reviewers end diff --git a/lib/moderation_api/models/operations/getwebhook_request.rb b/lib/moderation_api/models/operations/getwebhook_request.rb index ffce400d..4e1ba244 100644 --- a/lib/moderation_api/models/operations/getwebhook_request.rb +++ b/lib/moderation_api/models/operations/getwebhook_request.rb @@ -13,7 +13,7 @@ class GetWebhookRequest # The ID of the webhook to get. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/getwebhooksecret_request.rb b/lib/moderation_api/models/operations/getwebhooksecret_request.rb index e46a58ba..5abf6f09 100644 --- a/lib/moderation_api/models/operations/getwebhooksecret_request.rb +++ b/lib/moderation_api/models/operations/getwebhooksecret_request.rb @@ -11,7 +11,7 @@ class GetWebhookSecretRequest extend T::Sig include Crystalline::MetadataFields - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/getwordlist_request.rb b/lib/moderation_api/models/operations/getwordlist_request.rb index 711f0418..15a74e2a 100644 --- a/lib/moderation_api/models/operations/getwordlist_request.rb +++ b/lib/moderation_api/models/operations/getwordlist_request.rb @@ -13,7 +13,7 @@ class GetWordlistRequest # ID of the wordlist to get field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb b/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb index 316e104d..e189981d 100644 --- a/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb +++ b/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb @@ -13,7 +13,7 @@ class GetWordlistEmbeddingStatusRequest # ID of the wordlist to check embedding status for field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/isflagged.rb b/lib/moderation_api/models/operations/isflagged.rb deleted file mode 100644 index d365658a..00000000 --- a/lib/moderation_api/models/operations/isflagged.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - - class IsFlagged - include ::Crystalline::Enum - enums do - ALL = new("ALL") - FLAGGED = new("FLAGGED") - NOT_FLAGGED = new("NOT_FLAGGED") - SHADOW_FLAGGED = new("SHADOW_FLAGGED") - end - - open! - end - end - end -end diff --git a/lib/moderation_api/models/operations/isflagged.rbi b/lib/moderation_api/models/operations/isflagged.rbi deleted file mode 100644 index 6ac05e4a..00000000 --- a/lib/moderation_api/models/operations/isflagged.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::IsFlagged - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::IsFlagged -end diff --git a/lib/moderation_api/models/operations/submitcontent_label.rb b/lib/moderation_api/models/operations/label.rb similarity index 98% rename from lib/moderation_api/models/operations/submitcontent_label.rb rename to lib/moderation_api/models/operations/label.rb index 8b4ce380..fa4428db 100644 --- a/lib/moderation_api/models/operations/submitcontent_label.rb +++ b/lib/moderation_api/models/operations/label.rb @@ -7,7 +7,7 @@ module ModerationApi module Models module Operations - class SubmitContentLabel + class Label extend T::Sig include Crystalline::MetadataFields diff --git a/lib/moderation_api/models/operations/submitcontent_label.rbi b/lib/moderation_api/models/operations/label.rbi similarity index 72% rename from lib/moderation_api/models/operations/submitcontent_label.rbi rename to lib/moderation_api/models/operations/label.rbi index 8bc202c5..514875a6 100644 --- a/lib/moderation_api/models/operations/submitcontent_label.rbi +++ b/lib/moderation_api/models/operations/label.rbi @@ -1,11 +1,11 @@ # typed: true # frozen_string_literal: true -class ModerationApi::Models::Operations::SubmitContentLabel +class ModerationApi::Models::Operations::Label extend ::Crystalline::MetadataFields::ClassMethods end -class ModerationApi::Models::Operations::SubmitContentLabel +class ModerationApi::Models::Operations::Label def id end diff --git a/lib/moderation_api/models/operations/listactions_request.rb b/lib/moderation_api/models/operations/listactions_request.rb index 568ddb30..e183064d 100644 --- a/lib/moderation_api/models/operations/listactions_request.rb +++ b/lib/moderation_api/models/operations/listactions_request.rb @@ -16,7 +16,7 @@ class ListActionsRequest Crystalline::Nilable.new(::String), {'query_param': {'field_name': "queueId", 'style': "form", 'explode': true}} ) - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/listauthors_request.rb b/lib/moderation_api/models/operations/listauthors_request.rb index 60215830..96b8d4d6 100644 --- a/lib/moderation_api/models/operations/listauthors_request.rb +++ b/lib/moderation_api/models/operations/listauthors_request.rb @@ -28,13 +28,7 @@ class ListAuthorsRequest Crystalline::Nilable.new(::String), {'query_param': {'field_name': "lastActiveDate", 'style': "form", 'explode': true}} ) - - field( - :content_types, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'query_param': {'field_name': "contentTypes", 'style': "form", 'explode': true}} - ) - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), @@ -55,7 +49,7 @@ class ListAuthorsRequest # Sort direction field( :sort_direction, - Crystalline::Nilable.new(Models::Operations::ListAuthorsSortDirection), + Crystalline::Nilable.new(Models::Operations::SortDirection), {'query_param': {'field_name': "sortDirection", 'style': "form", 'explode': true}} ) @@ -64,11 +58,10 @@ class ListAuthorsRequest sort_by: T.nilable(Models::Operations::SortBy), member_since_date: T.nilable(::String), last_active_date: T.nilable(::String), - content_types: T.nilable(T::Array[::String]), project_id: T.nilable(::String), page: T.nilable(::Integer), page_size: T.nilable(::Integer), - sort_direction: T.nilable(Models::Operations::ListAuthorsSortDirection) + sort_direction: T.nilable(Models::Operations::SortDirection) ) .void } @@ -76,16 +69,14 @@ def initialize( sort_by: nil, member_since_date: nil, last_active_date: nil, - content_types: nil, project_id: nil, page: 1, page_size: 20, - sort_direction: Models::Operations::ListAuthorsSortDirection::DESC + sort_direction: Models::Operations::SortDirection::DESC ) @sort_by = sort_by @member_since_date = member_since_date @last_active_date = last_active_date - @content_types = content_types @project_id = project_id @page = page @page_size = page_size @@ -98,7 +89,6 @@ def ==(other) return false unless @sort_by == other.sort_by return false unless @member_since_date == other.member_since_date return false unless @last_active_date == other.last_active_date - return false unless @content_types == other.content_types return false unless @project_id == other.project_id return false unless @page == other.page return false unless @page_size == other.page_size diff --git a/lib/moderation_api/models/operations/listauthors_request.rbi b/lib/moderation_api/models/operations/listauthors_request.rbi index b56f7430..dd7997a0 100644 --- a/lib/moderation_api/models/operations/listauthors_request.rbi +++ b/lib/moderation_api/models/operations/listauthors_request.rbi @@ -24,12 +24,6 @@ class ModerationApi::Models::Operations::ListAuthorsRequest def last_active_date=(str_) end - def content_types - end - - def content_types=(str_) - end - def project_id end diff --git a/lib/moderation_api/models/operations/listauthors_sortdirection.rbi b/lib/moderation_api/models/operations/listauthors_sortdirection.rbi deleted file mode 100644 index 7de88b9a..00000000 --- a/lib/moderation_api/models/operations/listauthors_sortdirection.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::ListAuthorsSortDirection - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::ListAuthorsSortDirection -end diff --git a/lib/moderation_api/models/operations/listqueueitems_action.rbi b/lib/moderation_api/models/operations/listqueueitems_action.rbi deleted file mode 100644 index 125a4cc2..00000000 --- a/lib/moderation_api/models/operations/listqueueitems_action.rbi +++ /dev/null @@ -1,38 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::ListQueueItemsAction - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::ListQueueItemsAction - def id - end - - def id=(str_) - end - - def name - end - - def name=(str_) - end - - def timestamp - end - - def timestamp=(str_) - end - - def comment - end - - def comment=(str_) - end - - def reviewer - end - - def reviewer=(str_) - end -end diff --git a/lib/moderation_api/models/operations/listqueueitems_request.rb b/lib/moderation_api/models/operations/listqueueitems_request.rb index aed83282..107c9124 100644 --- a/lib/moderation_api/models/operations/listqueueitems_request.rb +++ b/lib/moderation_api/models/operations/listqueueitems_request.rb @@ -11,13 +11,19 @@ class ListQueueItemsRequest extend T::Sig include Crystalline::MetadataFields - # The queue ID + # The queue ID. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field( - :sort_field, - Crystalline::Nilable.new(Models::Operations::SortField), - {'query_param': {'field_name': "sortField", 'style': "form", 'explode': true}} + :sort, + Crystalline::Nilable.new(Models::Operations::Sort), + {'query_param': {'field_name': "sort", 'style': "form", 'explode': true}} + ) + + field( + :include_resolved, + Crystalline::Nilable.new(Crystalline::Boolean.new), + {'query_param': {'field_name': "includeResolved", 'style': "form", 'explode': true}} ) field( @@ -33,35 +39,29 @@ class ListQueueItemsRequest ) field( - :after_date, - Crystalline::Nilable.new(::String), - {'query_param': {'field_name': "afterDate", 'style': "form", 'explode': true}} - ) - - field( - :before_date, + :author_id, Crystalline::Nilable.new(::String), - {'query_param': {'field_name': "beforeDate", 'style': "form", 'explode': true}} + {'query_param': {'field_name': "authorId", 'style': "form", 'explode': true}} ) field( - :include_resolved, - Crystalline::Nilable.new(Crystalline::Boolean.new), - {'query_param': {'field_name': "includeResolved", 'style': "form", 'explode': true}} + :filtered_action_ids, + Crystalline::Nilable.new(Crystalline::Array.new(::String)), + {'query_param': {'field_name': "filteredActionIds", 'style': "form", 'explode': true}} ) field( - :author_id, + :after_date, Crystalline::Nilable.new(::String), - {'query_param': {'field_name': "authorId", 'style': "form", 'explode': true}} + {'query_param': {'field_name': "afterDate", 'style': "form", 'explode': true}} ) field( - :filtered_action_ids, - Crystalline::Nilable.new(Crystalline::Array.new(::String)), - {'query_param': {'field_name': "filteredActionIds", 'style': "form", 'explode': true}} + :before_date, + Crystalline::Nilable.new(::String), + {'query_param': {'field_name': "beforeDate", 'style': "form", 'explode': true}} ) - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), @@ -79,77 +79,67 @@ class ListQueueItemsRequest Crystalline::Nilable.new(::Integer), {'query_param': {'field_name': "pageSize", 'style': "form", 'explode': true}} ) - # Sort direction - field( - :sort_direction, - Crystalline::Nilable.new(Models::Operations::ListQueueItemsSortDirection), - {'query_param': {'field_name': "sortDirection", 'style': "form", 'explode': true}} - ) sig { params( id: ::String, - sort_field: T.nilable(Models::Operations::SortField), + sort: T.nilable(Models::Operations::Sort), + include_resolved: T.nilable(T::Boolean), conversation_ids: T.nilable(T::Array[::String]), labels: T.nilable(T::Array[::String]), - after_date: T.nilable(::String), - before_date: T.nilable(::String), - include_resolved: T.nilable(T::Boolean), author_id: T.nilable(::String), filtered_action_ids: T.nilable(T::Array[::String]), + after_date: T.nilable(::String), + before_date: T.nilable(::String), project_id: T.nilable(::String), page: T.nilable(::Integer), - page_size: T.nilable(::Integer), - sort_direction: T.nilable(Models::Operations::ListQueueItemsSortDirection) + page_size: T.nilable(::Integer) ) .void } def initialize( id:, - sort_field: nil, + sort: nil, + include_resolved: nil, conversation_ids: nil, labels: nil, - after_date: nil, - before_date: nil, - include_resolved: nil, author_id: nil, filtered_action_ids: nil, + after_date: nil, + before_date: nil, project_id: nil, page: 1, - page_size: 20, - sort_direction: Models::Operations::ListQueueItemsSortDirection::DESC + page_size: 20 ) @id = id - @sort_field = sort_field + @sort = sort + @include_resolved = include_resolved @conversation_ids = conversation_ids @labels = labels - @after_date = after_date - @before_date = before_date - @include_resolved = include_resolved @author_id = author_id @filtered_action_ids = filtered_action_ids + @after_date = after_date + @before_date = before_date @project_id = project_id @page = page @page_size = page_size - @sort_direction = sort_direction end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id - return false unless @sort_field == other.sort_field + return false unless @sort == other.sort + return false unless @include_resolved == other.include_resolved return false unless @conversation_ids == other.conversation_ids return false unless @labels == other.labels - return false unless @after_date == other.after_date - return false unless @before_date == other.before_date - return false unless @include_resolved == other.include_resolved return false unless @author_id == other.author_id return false unless @filtered_action_ids == other.filtered_action_ids + return false unless @after_date == other.after_date + return false unless @before_date == other.before_date return false unless @project_id == other.project_id return false unless @page == other.page return false unless @page_size == other.page_size - return false unless @sort_direction == other.sort_direction true end end diff --git a/lib/moderation_api/models/operations/listqueueitems_request.rbi b/lib/moderation_api/models/operations/listqueueitems_request.rbi index b01dd507..8fc623a7 100644 --- a/lib/moderation_api/models/operations/listqueueitems_request.rbi +++ b/lib/moderation_api/models/operations/listqueueitems_request.rbi @@ -12,52 +12,52 @@ class ModerationApi::Models::Operations::ListQueueItemsRequest def id=(str_) end - def sort_field + def sort end - def sort_field=(str_) + def sort=(str_) end - def conversation_ids + def include_resolved end - def conversation_ids=(str_) + def include_resolved=(str_) end - def labels + def conversation_ids end - def labels=(str_) + def conversation_ids=(str_) end - def after_date + def labels end - def after_date=(str_) + def labels=(str_) end - def before_date + def author_id end - def before_date=(str_) + def author_id=(str_) end - def include_resolved + def filtered_action_ids end - def include_resolved=(str_) + def filtered_action_ids=(str_) end - def author_id + def after_date end - def author_id=(str_) + def after_date=(str_) end - def filtered_action_ids + def before_date end - def filtered_action_ids=(str_) + def before_date=(str_) end def project_id @@ -77,10 +77,4 @@ class ModerationApi::Models::Operations::ListQueueItemsRequest def page_size=(str_) end - - def sort_direction - end - - def sort_direction=(str_) - end end diff --git a/lib/moderation_api/models/operations/listqueueitems_responsebody.rb b/lib/moderation_api/models/operations/listqueueitems_responsebody.rb index ce24d329..86e072fc 100644 --- a/lib/moderation_api/models/operations/listqueueitems_responsebody.rb +++ b/lib/moderation_api/models/operations/listqueueitems_responsebody.rb @@ -14,7 +14,7 @@ class ListQueueItemsResponseBody # The items on this page. field( :data, - Crystalline::Array.new(Models::Operations::ListQueueItemsData), + Crystalline::Array.new(Models::Components::QueueItem), {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("data"), required: true}} ) # Where this page is in the full list. @@ -24,10 +24,7 @@ class ListQueueItemsResponseBody {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("pagination"), required: true}} ) - sig { - params(data: T::Array[Models::Operations::ListQueueItemsData], pagination: Models::Components::Pagination) - .void - } + sig { params(data: T::Array[Models::Components::QueueItem], pagination: Models::Components::Pagination).void } def initialize(data:, pagination:) @data = data @pagination = pagination diff --git a/lib/moderation_api/models/operations/listqueueitems_sortdirection.rbi b/lib/moderation_api/models/operations/listqueueitems_sortdirection.rbi deleted file mode 100644 index 7671d2ec..00000000 --- a/lib/moderation_api/models/operations/listqueueitems_sortdirection.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::ListQueueItemsSortDirection - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::ListQueueItemsSortDirection -end diff --git a/lib/moderation_api/models/operations/listqueueitems_status.rbi b/lib/moderation_api/models/operations/listqueueitems_status.rbi deleted file mode 100644 index 5a0358a9..00000000 --- a/lib/moderation_api/models/operations/listqueueitems_status.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::ListQueueItemsStatus - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::ListQueueItemsStatus -end diff --git a/lib/moderation_api/models/operations/listqueues_request.rb b/lib/moderation_api/models/operations/listqueues_request.rb new file mode 100644 index 00000000..48cfdbf5 --- /dev/null +++ b/lib/moderation_api/models/operations/listqueues_request.rb @@ -0,0 +1,53 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class ListQueuesRequest + extend T::Sig + include Crystalline::MetadataFields + + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + + field( + :page, + Crystalline::Nilable.new(::Integer), + {'query_param': {'field_name': "page", 'style': "form", 'explode': true}} + ) + + field( + :page_size, + Crystalline::Nilable.new(::Integer), + {'query_param': {'field_name': "pageSize", 'style': "form", 'explode': true}} + ) + + sig { + params(project_id: T.nilable(::String), page: T.nilable(::Integer), page_size: T.nilable(::Integer)).void + } + def initialize(project_id: nil, page: 1, page_size: 20) + @project_id = project_id + @page = page + @page_size = page_size + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @project_id == other.project_id + return false unless @page == other.page + return false unless @page_size == other.page_size + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/listqueues_request.rbi b/lib/moderation_api/models/operations/listqueues_request.rbi new file mode 100644 index 00000000..87726304 --- /dev/null +++ b/lib/moderation_api/models/operations/listqueues_request.rbi @@ -0,0 +1,26 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::ListQueuesRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::ListQueuesRequest + def project_id + end + + def project_id=(str_) + end + + def page + end + + def page=(str_) + end + + def page_size + end + + def page_size=(str_) + end +end diff --git a/lib/moderation_api/models/operations/listqueues_response.rb b/lib/moderation_api/models/operations/listqueues_response.rb new file mode 100644 index 00000000..a7099413 --- /dev/null +++ b/lib/moderation_api/models/operations/listqueues_response.rb @@ -0,0 +1,63 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class ListQueuesResponse + extend T::Sig + include Crystalline::MetadataFields + sig { returns(T.proc.returns(T.nilable(ListQueuesResponse))) } + attr_accessor :next_page + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # Successful response + field :object, Crystalline::Nilable.new(Models::Operations::ListQueuesResponseBody) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + object: T.nilable(Models::Operations::ListQueuesResponseBody) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, object: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @object = object + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @object == other.object + true + end + + def each + page = self + loop do + yield page + next_page = page.next_page.call if page.next_page + break if next_page.nil? + page = T.must(next_page) + end + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/listqueues_response.rbi b/lib/moderation_api/models/operations/listqueues_response.rbi new file mode 100644 index 00000000..392ba3f6 --- /dev/null +++ b/lib/moderation_api/models/operations/listqueues_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::ListQueuesResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::ListQueuesResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def object + end + + def object=(str_) + end +end diff --git a/lib/moderation_api/models/operations/listqueues_responsebody.rb b/lib/moderation_api/models/operations/listqueues_responsebody.rb new file mode 100644 index 00000000..456768ec --- /dev/null +++ b/lib/moderation_api/models/operations/listqueues_responsebody.rb @@ -0,0 +1,43 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Successful response + class ListQueuesResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # The items on this page. + field( + :data, + Crystalline::Array.new(Models::Components::Queue), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("data"), required: true}} + ) + # Where this page is in the full list. + field( + :pagination, + Models::Components::Pagination, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("pagination"), required: true}} + ) + + sig { params(data: T::Array[Models::Components::Queue], pagination: Models::Components::Pagination).void } + def initialize(data:, pagination:) + @data = data + @pagination = pagination + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @data == other.data + return false unless @pagination == other.pagination + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/listqueues_responsebody.rbi b/lib/moderation_api/models/operations/listqueues_responsebody.rbi new file mode 100644 index 00000000..8875e7b2 --- /dev/null +++ b/lib/moderation_api/models/operations/listqueues_responsebody.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::ListQueuesResponseBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::ListQueuesResponseBody + def data + end + + def data=(str_) + end + + def pagination + end + + def pagination=(str_) + end +end diff --git a/lib/moderation_api/models/operations/listwebhooks_request.rb b/lib/moderation_api/models/operations/listwebhooks_request.rb index b0f2b88a..24ce039f 100644 --- a/lib/moderation_api/models/operations/listwebhooks_request.rb +++ b/lib/moderation_api/models/operations/listwebhooks_request.rb @@ -11,7 +11,7 @@ class ListWebhooksRequest extend T::Sig include Crystalline::MetadataFields - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/listwordlists_request.rb b/lib/moderation_api/models/operations/listwordlists_request.rb index 0b4457c8..834e443a 100644 --- a/lib/moderation_api/models/operations/listwordlists_request.rb +++ b/lib/moderation_api/models/operations/listwordlists_request.rb @@ -11,7 +11,7 @@ class ListWordlistsRequest extend T::Sig include Crystalline::MetadataFields - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/mediatype.rb b/lib/moderation_api/models/operations/mediatype.rb deleted file mode 100644 index 2c595766..00000000 --- a/lib/moderation_api/models/operations/mediatype.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - - class MediaType - include ::Crystalline::Enum - enums do - TEXT = new("text") - IMAGE = new("image") - VIDEO = new("video") - OBJECT = new("object") - AUDIO = new("audio") - end - - open! - end - end - end -end diff --git a/lib/moderation_api/models/operations/metadatafilter.rb b/lib/moderation_api/models/operations/metadatafilter.rb deleted file mode 100644 index e444ed23..00000000 --- a/lib/moderation_api/models/operations/metadatafilter.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - - class MetadataFilter - extend T::Sig - include Crystalline::MetadataFields - - field :key, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("key"), required: true}} - - field( - :value, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("value"), required: true}} - ) - - sig { params(key: ::String, value: ::String).void } - def initialize(key:, value:) - @key = key - @value = value - end - - sig { params(other: T.untyped).returns(T::Boolean) } - def ==(other) - return false unless other.is_a?(self.class) - return false unless @key == other.key - return false unless @value == other.value - true - end - end - end - end -end diff --git a/lib/moderation_api/models/operations/metadatafilter.rbi b/lib/moderation_api/models/operations/metadatafilter.rbi deleted file mode 100644 index d9a9cd6f..00000000 --- a/lib/moderation_api/models/operations/metadatafilter.rbi +++ /dev/null @@ -1,20 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::MetadataFilter - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::MetadataFilter - def key - end - - def key=(str_) - end - - def value - end - - def value=(str_) - end -end diff --git a/lib/moderation_api/models/operations/policy_response.rbi b/lib/moderation_api/models/operations/policy_response.rbi deleted file mode 100644 index b1bf37c6..00000000 --- a/lib/moderation_api/models/operations/policy_response.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::PolicyResponse - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::PolicyResponse -end diff --git a/lib/moderation_api/models/operations/previousperiod.rb b/lib/moderation_api/models/operations/previousperiod.rb new file mode 100644 index 00000000..1ff186fa --- /dev/null +++ b/lib/moderation_api/models/operations/previousperiod.rb @@ -0,0 +1,112 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # The same counts for the window of equal length just before this one. Compare with `totals` to see the trend. + class PreviousPeriod + extend T::Sig + include Crystalline::MetadataFields + + # Requests received. Every request counts, also repeats and edits of the same content. + field( + :requests, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("requests"), required: true}} + ) + # Requests that were flagged. + field( + :flagged, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagged"), required: true}} + ) + # The share of requests that were flagged: flagged / requests. 0 when there were no requests. + field( + :flag_rate, + ::Float, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagRate"), required: true}} + ) + # Requests with the recommendation "allow". Includes content that was not flagged. + field( + :allowed, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("allowed"), required: true}} + ) + # Requests with the recommendation "reject". All of them were flagged. + field( + :rejected, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("rejected"), required: true}} + ) + # Requests with the recommendation "review". This counts requests, not the deduplicated items in the review queue. + field( + :sent_to_review, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("sentToReview"), required: true}} + ) + # Flagged requests that were settled without human review: rejected plus flaggedButAllowed. + field( + :handled_automatically, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("handledAutomatically"), required: true}} + ) + # Flagged requests that were allowed without human review. + field( + :flagged_but_allowed, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flaggedButAllowed"), required: true}} + ) + + sig { + params( + requests: ::Integer, + flagged: ::Integer, + flag_rate: ::Float, + allowed: ::Integer, + rejected: ::Integer, + sent_to_review: ::Integer, + handled_automatically: ::Integer, + flagged_but_allowed: ::Integer + ) + .void + } + def initialize( + requests:, + flagged:, + flag_rate:, + allowed:, + rejected:, + sent_to_review:, + handled_automatically:, + flagged_but_allowed: + ) + @requests = requests + @flagged = flagged + @flag_rate = flag_rate + @allowed = allowed + @rejected = rejected + @sent_to_review = sent_to_review + @handled_automatically = handled_automatically + @flagged_but_allowed = flagged_but_allowed + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @requests == other.requests + return false unless @flagged == other.flagged + return false unless @flag_rate == other.flag_rate + return false unless @allowed == other.allowed + return false unless @rejected == other.rejected + return false unless @sent_to_review == other.sent_to_review + return false unless @handled_automatically == other.handled_automatically + return false unless @flagged_but_allowed == other.flagged_but_allowed + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/previousperiod.rbi b/lib/moderation_api/models/operations/previousperiod.rbi new file mode 100644 index 00000000..2895cce5 --- /dev/null +++ b/lib/moderation_api/models/operations/previousperiod.rbi @@ -0,0 +1,56 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::PreviousPeriod + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::PreviousPeriod + def requests + end + + def requests=(str_) + end + + def flagged + end + + def flagged=(str_) + end + + def flag_rate + end + + def flag_rate=(str_) + end + + def allowed + end + + def allowed=(str_) + end + + def rejected + end + + def rejected=(str_) + end + + def sent_to_review + end + + def sent_to_review=(str_) + end + + def handled_automatically + end + + def handled_automatically=(str_) + end + + def flagged_but_allowed + end + + def flagged_but_allowed=(str_) + end +end diff --git a/lib/moderation_api/models/operations/recommendation.rb b/lib/moderation_api/models/operations/recommendation.rb index 4472d088..3c998e0f 100644 --- a/lib/moderation_api/models/operations/recommendation.rb +++ b/lib/moderation_api/models/operations/recommendation.rb @@ -14,15 +14,12 @@ class Recommendation # The action to take based on the recommendation field( :action, - Models::Operations::SubmitContentRecommendationAction, + Models::Operations::ActionResponse, { 'format_json': { 'letter_case': ::ModerationApi::Utils.field_name("action"), required: true, - 'decoder': ::ModerationApi::Utils.open_enum_from_string( - Models::Operations::SubmitContentRecommendationAction, - false - ) + 'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::ActionResponse, false) } } ) @@ -41,7 +38,7 @@ class Recommendation sig { params( - action: Models::Operations::SubmitContentRecommendationAction, + action: Models::Operations::ActionResponse, reason_codes: T::Array[T.any(Models::Operations::ReasonCodeEnum, ::String)], matched_rules: T.nilable(T::Array[Models::Operations::MatchedRule]) ) diff --git a/lib/moderation_api/models/operations/removewordlistwords_request.rb b/lib/moderation_api/models/operations/removewordlistwords_request.rb index c559d7fe..0857bf6c 100644 --- a/lib/moderation_api/models/operations/removewordlistwords_request.rb +++ b/lib/moderation_api/models/operations/removewordlistwords_request.rb @@ -19,7 +19,7 @@ class RemoveWordlistWordsRequest Crystalline::Array.new(::String), {'query_param': {'field_name': "words", 'style': "form", 'explode': true}} ) - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/resolvequeueitem_request.rb b/lib/moderation_api/models/operations/resolvequeueitem_request.rb index 7624153f..34f16542 100644 --- a/lib/moderation_api/models/operations/resolvequeueitem_request.rb +++ b/lib/moderation_api/models/operations/resolvequeueitem_request.rb @@ -11,32 +11,21 @@ class ResolveQueueItemRequest extend T::Sig include Crystalline::MetadataFields - # The queue ID + # The queue ID. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The item ID to resolve + # The item ID to resolve. field :item_id, ::String, {'path_param': {'field_name': "itemId", 'style': "simple", 'explode': false}} - - field :body, Models::Operations::ResolveQueueItemRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} ) - sig { - params( - id: ::String, - item_id: ::String, - body: Models::Operations::ResolveQueueItemRequestBody, - project_id: T.nilable(::String) - ) - .void - } - def initialize(id:, item_id:, body:, project_id: nil) + sig { params(id: ::String, item_id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, item_id:, project_id: nil) @id = id @item_id = item_id - @body = body @project_id = project_id end @@ -45,7 +34,6 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @item_id == other.item_id - return false unless @body == other.body return false unless @project_id == other.project_id true end diff --git a/lib/moderation_api/models/operations/resolvequeueitem_request.rbi b/lib/moderation_api/models/operations/resolvequeueitem_request.rbi index ebd0d3b7..94586336 100644 --- a/lib/moderation_api/models/operations/resolvequeueitem_request.rbi +++ b/lib/moderation_api/models/operations/resolvequeueitem_request.rbi @@ -18,12 +18,6 @@ class ModerationApi::Models::Operations::ResolveQueueItemRequest def item_id=(str_) end - def body - end - - def body=(str_) - end - def project_id end diff --git a/lib/moderation_api/models/operations/resolvequeueitem_requestbody.rbi b/lib/moderation_api/models/operations/resolvequeueitem_requestbody.rbi deleted file mode 100644 index 49a8a9d4..00000000 --- a/lib/moderation_api/models/operations/resolvequeueitem_requestbody.rbi +++ /dev/null @@ -1,14 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::ResolveQueueItemRequestBody - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::ResolveQueueItemRequestBody - def comment - end - - def comment=(str_) - end -end diff --git a/lib/moderation_api/models/operations/resolvequeueitem_responsebody.rb b/lib/moderation_api/models/operations/resolvequeueitem_responsebody.rb index d03dcc9f..6ee850ff 100644 --- a/lib/moderation_api/models/operations/resolvequeueitem_responsebody.rb +++ b/lib/moderation_api/models/operations/resolvequeueitem_responsebody.rb @@ -16,24 +16,17 @@ class ResolveQueueItemResponseBody Crystalline::Boolean.new, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("success"), required: true}} ) - # Timestamp when the item was resolved + # When the item was resolved (ISO 8601). field( :resolved_at, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("resolvedAt"), required: true}} ) - # Optional comment - field( - :comment, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("comment")}} - ) - sig { params(success: T::Boolean, resolved_at: ::String, comment: T.nilable(::String)).void } - def initialize(success:, resolved_at:, comment: nil) + sig { params(success: T::Boolean, resolved_at: ::String).void } + def initialize(success:, resolved_at:) @success = success @resolved_at = resolved_at - @comment = comment end sig { params(other: T.untyped).returns(T::Boolean) } @@ -41,7 +34,6 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @success == other.success return false unless @resolved_at == other.resolved_at - return false unless @comment == other.comment true end end diff --git a/lib/moderation_api/models/operations/resolvequeueitem_responsebody.rbi b/lib/moderation_api/models/operations/resolvequeueitem_responsebody.rbi index 0702b97d..1e2ae661 100644 --- a/lib/moderation_api/models/operations/resolvequeueitem_responsebody.rbi +++ b/lib/moderation_api/models/operations/resolvequeueitem_responsebody.rbi @@ -17,10 +17,4 @@ class ModerationApi::Models::Operations::ResolveQueueItemResponseBody def resolved_at=(str_) end - - def comment - end - - def comment=(str_) - end end diff --git a/lib/moderation_api/models/operations/resolvequeueitems_request.rb b/lib/moderation_api/models/operations/resolvequeueitems_request.rb new file mode 100644 index 00000000..e4e62c61 --- /dev/null +++ b/lib/moderation_api/models/operations/resolvequeueitems_request.rb @@ -0,0 +1,46 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class ResolveQueueItemsRequest + extend T::Sig + include Crystalline::MetadataFields + + # The queue ID. + field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} + + field :body, Models::Operations::ResolveQueueItemsRequestBody, {'request': {'media_type': "application/json"}} + # 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. + field( + :project_id, + Crystalline::Nilable.new(::String), + {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} + ) + + sig { + params(id: ::String, body: Models::Operations::ResolveQueueItemsRequestBody, project_id: T.nilable(::String)) + .void + } + def initialize(id:, body:, project_id: nil) + @id = id + @body = body + @project_id = project_id + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @id == other.id + return false unless @body == other.body + return false unless @project_id == other.project_id + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/resolvequeueitems_request.rbi b/lib/moderation_api/models/operations/resolvequeueitems_request.rbi new file mode 100644 index 00000000..cca68f45 --- /dev/null +++ b/lib/moderation_api/models/operations/resolvequeueitems_request.rbi @@ -0,0 +1,26 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::ResolveQueueItemsRequest + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::ResolveQueueItemsRequest + def id + end + + def id=(str_) + end + + def body + end + + def body=(str_) + end + + def project_id + end + + def project_id=(str_) + end +end diff --git a/lib/moderation_api/models/operations/unresolvequeueitem_requestbody.rb b/lib/moderation_api/models/operations/resolvequeueitems_requestbody.rb similarity index 58% rename from lib/moderation_api/models/operations/unresolvequeueitem_requestbody.rb rename to lib/moderation_api/models/operations/resolvequeueitems_requestbody.rb index 544fea34..413a461a 100644 --- a/lib/moderation_api/models/operations/unresolvequeueitem_requestbody.rb +++ b/lib/moderation_api/models/operations/resolvequeueitems_requestbody.rb @@ -7,26 +7,26 @@ module ModerationApi module Models module Operations - class UnresolveQueueItemRequestBody + class ResolveQueueItemsRequestBody extend T::Sig include Crystalline::MetadataFields - # Optional reason for unresolving the item + # The item IDs to resolve. Up to 100. field( - :comment, - Crystalline::Nilable.new(::String), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("comment")}} + :item_ids, + Crystalline::Array.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("itemIds"), required: true}} ) - sig { params(comment: T.nilable(::String)).void } - def initialize(comment: nil) - @comment = comment + sig { params(item_ids: T::Array[::String]).void } + def initialize(item_ids:) + @item_ids = item_ids end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) - return false unless @comment == other.comment + return false unless @item_ids == other.item_ids true end end diff --git a/lib/moderation_api/models/operations/resolvequeueitems_requestbody.rbi b/lib/moderation_api/models/operations/resolvequeueitems_requestbody.rbi new file mode 100644 index 00000000..1f42c736 --- /dev/null +++ b/lib/moderation_api/models/operations/resolvequeueitems_requestbody.rbi @@ -0,0 +1,14 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::ResolveQueueItemsRequestBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::ResolveQueueItemsRequestBody + def item_ids + end + + def item_ids=(str_) + end +end diff --git a/lib/moderation_api/models/operations/resolvequeueitems_response.rb b/lib/moderation_api/models/operations/resolvequeueitems_response.rb new file mode 100644 index 00000000..29863c69 --- /dev/null +++ b/lib/moderation_api/models/operations/resolvequeueitems_response.rb @@ -0,0 +1,51 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class ResolveQueueItemsResponse + extend T::Sig + include Crystalline::MetadataFields + + # HTTP response content type for this operation + field :content_type, ::String + # HTTP response status code for this operation + field :status_code, ::Integer + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # Successful response + field :object, Crystalline::Nilable.new(Models::Operations::ResolveQueueItemsResponseBody) + + sig { + params( + content_type: ::String, + status_code: ::Integer, + raw_response: ::Faraday::Response, + object: T.nilable(Models::Operations::ResolveQueueItemsResponseBody) + ) + .void + } + def initialize(content_type:, status_code:, raw_response:, object: nil) + @content_type = content_type + @status_code = status_code + @raw_response = raw_response + @object = object + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @content_type == other.content_type + return false unless @status_code == other.status_code + return false unless @raw_response == other.raw_response + return false unless @object == other.object + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/resolvequeueitems_response.rbi b/lib/moderation_api/models/operations/resolvequeueitems_response.rbi new file mode 100644 index 00000000..b51278a7 --- /dev/null +++ b/lib/moderation_api/models/operations/resolvequeueitems_response.rbi @@ -0,0 +1,32 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::ResolveQueueItemsResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::ResolveQueueItemsResponse + def content_type + end + + def content_type=(str_) + end + + def status_code + end + + def status_code=(str_) + end + + def raw_response + end + + def raw_response=(str_) + end + + def object + end + + def object=(str_) + end +end diff --git a/lib/moderation_api/models/operations/resolvequeueitems_responsebody.rb b/lib/moderation_api/models/operations/resolvequeueitems_responsebody.rb new file mode 100644 index 00000000..d40cf8f5 --- /dev/null +++ b/lib/moderation_api/models/operations/resolvequeueitems_responsebody.rb @@ -0,0 +1,43 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Successful response + class ResolveQueueItemsResponseBody + extend T::Sig + include Crystalline::MetadataFields + + # Number of items resolved. + field( + :resolved, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("resolved"), required: true}} + ) + # Item IDs that do not exist in the project. + field( + :not_found_ids, + Crystalline::Array.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("notFoundIds"), required: true}} + ) + + sig { params(resolved: ::Integer, not_found_ids: T::Array[::String]).void } + def initialize(resolved:, not_found_ids:) + @resolved = resolved + @not_found_ids = not_found_ids + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @resolved == other.resolved + return false unless @not_found_ids == other.not_found_ids + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/resolvequeueitems_responsebody.rbi b/lib/moderation_api/models/operations/resolvequeueitems_responsebody.rbi new file mode 100644 index 00000000..49393014 --- /dev/null +++ b/lib/moderation_api/models/operations/resolvequeueitems_responsebody.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::ResolveQueueItemsResponseBody + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::ResolveQueueItemsResponseBody + def resolved + end + + def resolved=(str_) + end + + def not_found_ids + end + + def not_found_ids=(str_) + end +end diff --git a/lib/moderation_api/models/operations/reviewstats.rb b/lib/moderation_api/models/operations/reviewstats.rb index 400960fd..6c7745d9 100644 --- a/lib/moderation_api/models/operations/reviewstats.rb +++ b/lib/moderation_api/models/operations/reviewstats.rb @@ -11,28 +11,21 @@ class ReviewStats extend T::Sig include Crystalline::MetadataFields - # Average time in milliseconds to review an item - field( - :average_time_to_review, - ::Float, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("averageTimeToReview"), required: true}} - ) - # Total number of items reviewed + # Number of items resolved in this queue in the period. field( :total_reviewed, - ::Float, + ::Integer, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("totalReviewed"), required: true}} ) - # Total number of items pending review + # Number of items submitted in the period that wait for review now. field( :total_pending, - ::Float, + ::Integer, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("totalPending"), required: true}} ) - sig { params(average_time_to_review: ::Float, total_reviewed: ::Float, total_pending: ::Float).void } - def initialize(average_time_to_review:, total_reviewed:, total_pending:) - @average_time_to_review = average_time_to_review + sig { params(total_reviewed: ::Integer, total_pending: ::Integer).void } + def initialize(total_reviewed:, total_pending:) @total_reviewed = total_reviewed @total_pending = total_pending end @@ -40,7 +33,6 @@ def initialize(average_time_to_review:, total_reviewed:, total_pending:) sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) - return false unless @average_time_to_review == other.average_time_to_review return false unless @total_reviewed == other.total_reviewed return false unless @total_pending == other.total_pending true diff --git a/lib/moderation_api/models/operations/reviewstats.rbi b/lib/moderation_api/models/operations/reviewstats.rbi index 58c1e7bd..c3b3ed1b 100644 --- a/lib/moderation_api/models/operations/reviewstats.rbi +++ b/lib/moderation_api/models/operations/reviewstats.rbi @@ -6,12 +6,6 @@ class ModerationApi::Models::Operations::ReviewStats end class ModerationApi::Models::Operations::ReviewStats - def average_time_to_review - end - - def average_time_to_review=(str_) - end - def total_reviewed end diff --git a/lib/moderation_api/models/operations/flaggedcontenttrend.rb b/lib/moderation_api/models/operations/rule.rb similarity index 53% rename from lib/moderation_api/models/operations/flaggedcontenttrend.rb rename to lib/moderation_api/models/operations/rule.rb index bd37adee..132f8d14 100644 --- a/lib/moderation_api/models/operations/flaggedcontenttrend.rb +++ b/lib/moderation_api/models/operations/rule.rb @@ -7,34 +7,34 @@ module ModerationApi module Models module Operations - class FlaggedContentTrend + class Rule extend T::Sig include Crystalline::MetadataFields - # Content flag/label + # The rule name. "Other rules" holds all rules after the largest ones. field( - :label, + :name, ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("label"), required: true}} + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} ) - # Trend indicator (-1 to 1) showing if this type of flagged content is increasing or decreasing + # Flagged requests that this rule settled. field( - :trend, - ::Float, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("trend"), required: true}} + :count, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("count"), required: true}} ) - sig { params(label: ::String, trend: ::Float).void } - def initialize(label:, trend:) - @label = label - @trend = trend + sig { params(name: ::String, count: ::Integer).void } + def initialize(name:, count:) + @name = name + @count = count end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) - return false unless @label == other.label - return false unless @trend == other.trend + return false unless @name == other.name + return false unless @count == other.count true end end diff --git a/lib/moderation_api/models/operations/rule.rbi b/lib/moderation_api/models/operations/rule.rbi new file mode 100644 index 00000000..fc02f4af --- /dev/null +++ b/lib/moderation_api/models/operations/rule.rbi @@ -0,0 +1,20 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::Rule + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::Rule + def name + end + + def name=(str_) + end + + def count + end + + def count=(str_) + end +end diff --git a/lib/moderation_api/models/operations/listqueueitems_sortdirection.rb b/lib/moderation_api/models/operations/sort.rb similarity index 56% rename from lib/moderation_api/models/operations/listqueueitems_sortdirection.rb rename to lib/moderation_api/models/operations/sort.rb index 773a54e2..62520524 100644 --- a/lib/moderation_api/models/operations/listqueueitems_sortdirection.rb +++ b/lib/moderation_api/models/operations/sort.rb @@ -6,11 +6,13 @@ module ModerationApi module Models module Operations - # ListQueueItemsSortDirection - Sort direction - class ListQueueItemsSortDirection < T::Enum + # Sort + class Sort < T::Enum enums do - ASC = new("asc") - DESC = new("desc") + FIFO = new("FIFO") + LIFO = new("LIFO") + RANDOM = new("RANDOM") + SEVERITY_DESC = new("SEVERITY_DESC") end end end diff --git a/lib/moderation_api/models/operations/mediatype.rbi b/lib/moderation_api/models/operations/sort.rbi similarity index 51% rename from lib/moderation_api/models/operations/mediatype.rbi rename to lib/moderation_api/models/operations/sort.rbi index 5303bfc7..3c9d1a0b 100644 --- a/lib/moderation_api/models/operations/mediatype.rbi +++ b/lib/moderation_api/models/operations/sort.rbi @@ -1,9 +1,9 @@ # typed: true # frozen_string_literal: true -class ModerationApi::Models::Operations::MediaType +class ModerationApi::Models::Operations::Sort extend ::Crystalline::MetadataFields::ClassMethods end -class ModerationApi::Models::Operations::MediaType +class ModerationApi::Models::Operations::Sort end diff --git a/lib/moderation_api/models/operations/sortby.rb b/lib/moderation_api/models/operations/sortby.rb index 477263de..0c76f46e 100644 --- a/lib/moderation_api/models/operations/sortby.rb +++ b/lib/moderation_api/models/operations/sortby.rb @@ -11,7 +11,6 @@ class SortBy < T::Enum enums do TRUST_LEVEL = new("trustLevel") VIOLATION_COUNT = new("violationCount") - REPORT_COUNT = new("reportCount") MEMBER_SINCE = new("memberSince") LAST_ACTIVE = new("lastActive") CONTENT_COUNT = new("contentCount") diff --git a/lib/moderation_api/models/operations/listauthors_sortdirection.rb b/lib/moderation_api/models/operations/sortdirection.rb similarity index 74% rename from lib/moderation_api/models/operations/listauthors_sortdirection.rb rename to lib/moderation_api/models/operations/sortdirection.rb index e017cdf9..938a0fcb 100644 --- a/lib/moderation_api/models/operations/listauthors_sortdirection.rb +++ b/lib/moderation_api/models/operations/sortdirection.rb @@ -6,8 +6,8 @@ module ModerationApi module Models module Operations - # ListAuthorsSortDirection - Sort direction - class ListAuthorsSortDirection < T::Enum + # SortDirection - Sort direction + class SortDirection < T::Enum enums do ASC = new("asc") DESC = new("desc") diff --git a/lib/moderation_api/models/operations/sortdirection.rbi b/lib/moderation_api/models/operations/sortdirection.rbi new file mode 100644 index 00000000..8cdfcd66 --- /dev/null +++ b/lib/moderation_api/models/operations/sortdirection.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::SortDirection + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::SortDirection +end diff --git a/lib/moderation_api/models/operations/sortfield.rb b/lib/moderation_api/models/operations/sortfield.rb deleted file mode 100644 index 9252701f..00000000 --- a/lib/moderation_api/models/operations/sortfield.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - # SortField - class SortField < T::Enum - enums do - CREATED_AT = new("createdAt") - SEVERITY = new("severity") - REVIEWED_AT = new("reviewedAt") - end - end - end - end -end diff --git a/lib/moderation_api/models/operations/source.rb b/lib/moderation_api/models/operations/source.rb new file mode 100644 index 00000000..f6345e5e --- /dev/null +++ b/lib/moderation_api/models/operations/source.rb @@ -0,0 +1,20 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Source - Where the feedback was written: MCP server, agent skill, CLI or API. + class Source < T::Enum + enums do + MCP = new("mcp") + SKILL = new("skill") + CLI = new("cli") + API = new("api") + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/sortfield.rbi b/lib/moderation_api/models/operations/source.rbi similarity index 51% rename from lib/moderation_api/models/operations/sortfield.rbi rename to lib/moderation_api/models/operations/source.rbi index bf7af683..a119bd0d 100644 --- a/lib/moderation_api/models/operations/sortfield.rbi +++ b/lib/moderation_api/models/operations/source.rbi @@ -1,9 +1,9 @@ # typed: true # frozen_string_literal: true -class ModerationApi::Models::Operations::SortField +class ModerationApi::Models::Operations::Source extend ::Crystalline::MetadataFields::ClassMethods end -class ModerationApi::Models::Operations::SortField +class ModerationApi::Models::Operations::Source end diff --git a/lib/moderation_api/models/operations/author.rb b/lib/moderation_api/models/operations/submitcontent_author.rb similarity index 98% rename from lib/moderation_api/models/operations/author.rb rename to lib/moderation_api/models/operations/submitcontent_author.rb index 7c1afef8..1b36e1e9 100644 --- a/lib/moderation_api/models/operations/author.rb +++ b/lib/moderation_api/models/operations/submitcontent_author.rb @@ -7,7 +7,7 @@ module ModerationApi module Models module Operations - class Author + class SubmitContentAuthor extend T::Sig include Crystalline::MetadataFields diff --git a/lib/moderation_api/models/operations/author.rbi b/lib/moderation_api/models/operations/submitcontent_author.rbi similarity index 74% rename from lib/moderation_api/models/operations/author.rbi rename to lib/moderation_api/models/operations/submitcontent_author.rbi index 6879cb80..1b732b23 100644 --- a/lib/moderation_api/models/operations/author.rbi +++ b/lib/moderation_api/models/operations/submitcontent_author.rbi @@ -1,11 +1,11 @@ # typed: true # frozen_string_literal: true -class ModerationApi::Models::Operations::Author +class ModerationApi::Models::Operations::SubmitContentAuthor extend ::Crystalline::MetadataFields::ClassMethods end -class ModerationApi::Models::Operations::Author +class ModerationApi::Models::Operations::SubmitContentAuthor def id end diff --git a/lib/moderation_api/models/operations/policy_response.rb b/lib/moderation_api/models/operations/submitcontent_policy_response.rb similarity index 92% rename from lib/moderation_api/models/operations/policy_response.rb rename to lib/moderation_api/models/operations/submitcontent_policy_response.rb index 0d7b6002..aa99b874 100644 --- a/lib/moderation_api/models/operations/policy_response.rb +++ b/lib/moderation_api/models/operations/submitcontent_policy_response.rb @@ -7,7 +7,7 @@ module ModerationApi module Models module Operations # Policy output schema. - class PolicyResponse + class SubmitContentPolicyResponse extend T::Sig include Crystalline::MetadataFields diff --git a/lib/moderation_api/models/operations/submitcontent_policy_response.rbi b/lib/moderation_api/models/operations/submitcontent_policy_response.rbi new file mode 100644 index 00000000..fb3cd1f1 --- /dev/null +++ b/lib/moderation_api/models/operations/submitcontent_policy_response.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::SubmitContentPolicyResponse + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::SubmitContentPolicyResponse +end diff --git a/lib/moderation_api/models/operations/submitcontent_recommendation_action.rb b/lib/moderation_api/models/operations/submitcontent_recommendation_action.rb deleted file mode 100644 index d9a9dd21..00000000 --- a/lib/moderation_api/models/operations/submitcontent_recommendation_action.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - # SubmitContentRecommendationAction - The action to take based on the recommendation - class SubmitContentRecommendationAction - include ::Crystalline::Enum - enums do - REVIEW = new("review") - ALLOW = new("allow") - REJECT = new("reject") - end - - open! - end - end - end -end diff --git a/lib/moderation_api/models/operations/submitcontent_recommendation_action.rbi b/lib/moderation_api/models/operations/submitcontent_recommendation_action.rbi deleted file mode 100644 index 65827225..00000000 --- a/lib/moderation_api/models/operations/submitcontent_recommendation_action.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::SubmitContentRecommendationAction - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::SubmitContentRecommendationAction -end diff --git a/lib/moderation_api/models/operations/submitcontent_request.rb b/lib/moderation_api/models/operations/submitcontent_request.rb index 4b5aafcf..7389888a 100644 --- a/lib/moderation_api/models/operations/submitcontent_request.rb +++ b/lib/moderation_api/models/operations/submitcontent_request.rb @@ -12,7 +12,7 @@ class SubmitContentRequest include Crystalline::MetadataFields field :body, Models::Operations::SubmitContentRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/submitcontent_requestbody.rb b/lib/moderation_api/models/operations/submitcontent_requestbody.rb index c6aa831e..347d6448 100644 --- a/lib/moderation_api/models/operations/submitcontent_requestbody.rb +++ b/lib/moderation_api/models/operations/submitcontent_requestbody.rb @@ -86,7 +86,7 @@ class SubmitContentRequestBody Crystalline::Nilable.new(Models::Operations::ClientAction), {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("clientAction")}} ) - # Do not store the content. The content won't enter the review queue + # 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. field( :do_not_store, Crystalline::Nilable.new(Crystalline::Boolean.new), diff --git a/lib/moderation_api/models/operations/submitcontent_responsebody.rb b/lib/moderation_api/models/operations/submitcontent_responsebody.rb index d0ea1ac6..1df540ce 100644 --- a/lib/moderation_api/models/operations/submitcontent_responsebody.rb +++ b/lib/moderation_api/models/operations/submitcontent_responsebody.rb @@ -70,7 +70,7 @@ class SubmitContentResponseBody # The author of the content if your account has authors enabled. Requires you to send authorId when submitting content. field( :author, - Crystalline::Nilable.new(Models::Operations::Author), + Crystalline::Nilable.new(Models::Operations::SubmitContentAuthor), {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("author"), required: true}} ) # What your casebook — the record of your past moderation decisions — found for this content, or null when it had nothing close enough to say, when the matching cases disagreed, or when casebook lookups are not switched on for this channel. Reports what the casebook found; whether it decided the outcome is shown in `recommendation`, where a higher-priority rule may have settled the item first. @@ -103,7 +103,7 @@ class SubmitContentResponseBody ) ], meta: Models::Operations::Meta, - author: T.nilable(Models::Operations::Author), + author: T.nilable(Models::Operations::SubmitContentAuthor), casebook: T.nilable(Models::Operations::Casebook), errors: T.nilable(T::Array[Models::Operations::Error]) ) diff --git a/lib/moderation_api/models/operations/topaction.rb b/lib/moderation_api/models/operations/topaction.rb deleted file mode 100644 index ac76265c..00000000 --- a/lib/moderation_api/models/operations/topaction.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - - class TopAction - extend T::Sig - include Crystalline::MetadataFields - - # Most used action by this reviewer - field( - :action_id, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("actionId"), required: true}} - ) - # Name of the most used action - field( - :action_name, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("actionName"), required: true}} - ) - # Number of times this action was used - field( - :count, - ::Float, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("count"), required: true}} - ) - - sig { params(action_id: ::String, action_name: ::String, count: ::Float).void } - def initialize(action_id:, action_name:, count:) - @action_id = action_id - @action_name = action_name - @count = count - end - - sig { params(other: T.untyped).returns(T::Boolean) } - def ==(other) - return false unless other.is_a?(self.class) - return false unless @action_id == other.action_id - return false unless @action_name == other.action_name - return false unless @count == other.count - true - end - end - end - end -end diff --git a/lib/moderation_api/models/operations/topaction.rbi b/lib/moderation_api/models/operations/topaction.rbi deleted file mode 100644 index 0e0caf55..00000000 --- a/lib/moderation_api/models/operations/topaction.rbi +++ /dev/null @@ -1,26 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::TopAction - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::TopAction - def action_id - end - - def action_id=(str_) - end - - def action_name - end - - def action_name=(str_) - end - - def count - end - - def count=(str_) - end -end diff --git a/lib/moderation_api/models/operations/topreviewer.rb b/lib/moderation_api/models/operations/topreviewer.rb index 9f677dc5..0924d304 100644 --- a/lib/moderation_api/models/operations/topreviewer.rb +++ b/lib/moderation_api/models/operations/topreviewer.rb @@ -11,72 +11,38 @@ class TopReviewer extend T::Sig include Crystalline::MetadataFields - # ID of the reviewer - field( - :user_id, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("userId"), required: true}} - ) - # Name of the reviewer - field( - :name, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} - ) - # Number of items reviewed + # Number of items the reviewer resolved in the period. field( :review_count, - ::Float, + ::Integer, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("reviewCount"), required: true}} ) - # Average review time in milliseconds - field( - :average_time_per_review, - ::Float, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("averageTimePerReview"), required: true}} - ) - # Most common actions taken by this reviewer + # The user ID of the reviewer. `null` for items resolved with an API key. field( - :top_actions, - Crystalline::Array.new(Models::Operations::TopAction), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("topActions"), required: true}} + :user_id, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("userId"), required: true}} ) - # Optional accuracy score based on review quality metrics + # The name of the reviewer. field( - :accuracy_score, - Crystalline::Nilable.new(::Float), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("accuracyScore")}} + :name, + Crystalline::Nilable.new(::String), + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}} ) - sig { - params( - user_id: ::String, - name: ::String, - review_count: ::Float, - average_time_per_review: ::Float, - top_actions: T::Array[Models::Operations::TopAction], - accuracy_score: T.nilable(::Float) - ) - .void - } - def initialize(user_id:, name:, review_count:, average_time_per_review:, top_actions:, accuracy_score: nil) + sig { params(review_count: ::Integer, user_id: T.nilable(::String), name: T.nilable(::String)).void } + def initialize(review_count:, user_id: nil, name: nil) + @review_count = review_count @user_id = user_id @name = name - @review_count = review_count - @average_time_per_review = average_time_per_review - @top_actions = top_actions - @accuracy_score = accuracy_score end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) + return false unless @review_count == other.review_count return false unless @user_id == other.user_id return false unless @name == other.name - return false unless @review_count == other.review_count - return false unless @average_time_per_review == other.average_time_per_review - return false unless @top_actions == other.top_actions - return false unless @accuracy_score == other.accuracy_score true end end diff --git a/lib/moderation_api/models/operations/topreviewer.rbi b/lib/moderation_api/models/operations/topreviewer.rbi index cd980980..1b05b444 100644 --- a/lib/moderation_api/models/operations/topreviewer.rbi +++ b/lib/moderation_api/models/operations/topreviewer.rbi @@ -6,39 +6,21 @@ class ModerationApi::Models::Operations::TopReviewer end class ModerationApi::Models::Operations::TopReviewer - def user_id - end - - def user_id=(str_) - end - - def name - end - - def name=(str_) - end - def review_count end def review_count=(str_) end - def average_time_per_review - end - - def average_time_per_review=(str_) - end - - def top_actions + def user_id end - def top_actions=(str_) + def user_id=(str_) end - def accuracy_score + def name end - def accuracy_score=(str_) + def name=(str_) end end diff --git a/lib/moderation_api/models/operations/totals.rb b/lib/moderation_api/models/operations/totals.rb new file mode 100644 index 00000000..d44ee502 --- /dev/null +++ b/lib/moderation_api/models/operations/totals.rb @@ -0,0 +1,122 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + # Request counts for the window. A flagged request has one recommendation: allow, reject or review. + class Totals + extend T::Sig + include Crystalline::MetadataFields + + # Requests received. Every request counts, also repeats and edits of the same content. + field( + :requests, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("requests"), required: true}} + ) + # Requests that were flagged. + field( + :flagged, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagged"), required: true}} + ) + # The share of requests that were flagged: flagged / requests. 0 when there were no requests. + field( + :flag_rate, + ::Float, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagRate"), required: true}} + ) + # Requests with the recommendation "allow". Includes content that was not flagged. + field( + :allowed, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("allowed"), required: true}} + ) + # Requests with the recommendation "reject". All of them were flagged. + field( + :rejected, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("rejected"), required: true}} + ) + # Requests with the recommendation "review". This counts requests, not the deduplicated items in the review queue. + field( + :sent_to_review, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("sentToReview"), required: true}} + ) + # Flagged requests that were settled without human review: rejected plus flaggedButAllowed. + field( + :handled_automatically, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("handledAutomatically"), required: true}} + ) + # Flagged requests that were allowed without human review. + field( + :flagged_but_allowed, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flaggedButAllowed"), required: true}} + ) + # Distinct authors that sent content in the window. Approximate. + field( + :distinct_authors, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("distinctAuthors"), required: true}} + ) + + sig { + params( + requests: ::Integer, + flagged: ::Integer, + flag_rate: ::Float, + allowed: ::Integer, + rejected: ::Integer, + sent_to_review: ::Integer, + handled_automatically: ::Integer, + flagged_but_allowed: ::Integer, + distinct_authors: ::Integer + ) + .void + } + def initialize( + requests:, + flagged:, + flag_rate:, + allowed:, + rejected:, + sent_to_review:, + handled_automatically:, + flagged_but_allowed:, + distinct_authors: + ) + @requests = requests + @flagged = flagged + @flag_rate = flag_rate + @allowed = allowed + @rejected = rejected + @sent_to_review = sent_to_review + @handled_automatically = handled_automatically + @flagged_but_allowed = flagged_but_allowed + @distinct_authors = distinct_authors + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @requests == other.requests + return false unless @flagged == other.flagged + return false unless @flag_rate == other.flag_rate + return false unless @allowed == other.allowed + return false unless @rejected == other.rejected + return false unless @sent_to_review == other.sent_to_review + return false unless @handled_automatically == other.handled_automatically + return false unless @flagged_but_allowed == other.flagged_but_allowed + return false unless @distinct_authors == other.distinct_authors + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/totals.rbi b/lib/moderation_api/models/operations/totals.rbi new file mode 100644 index 00000000..a5af5e57 --- /dev/null +++ b/lib/moderation_api/models/operations/totals.rbi @@ -0,0 +1,62 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::Totals + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::Totals + def requests + end + + def requests=(str_) + end + + def flagged + end + + def flagged=(str_) + end + + def flag_rate + end + + def flag_rate=(str_) + end + + def allowed + end + + def allowed=(str_) + end + + def rejected + end + + def rejected=(str_) + end + + def sent_to_review + end + + def sent_to_review=(str_) + end + + def handled_automatically + end + + def handled_automatically=(str_) + end + + def flagged_but_allowed + end + + def flagged_but_allowed=(str_) + end + + def distinct_authors + end + + def distinct_authors=(str_) + end +end diff --git a/lib/moderation_api/models/operations/trends.rb b/lib/moderation_api/models/operations/trends.rb index 46ed10d2..02e67bd2 100644 --- a/lib/moderation_api/models/operations/trends.rb +++ b/lib/moderation_api/models/operations/trends.rb @@ -11,35 +11,22 @@ class Trends extend T::Sig include Crystalline::MetadataFields + # Resolved items per day. Days with no reviews are left out. field( :daily_review_counts, Crystalline::Array.new(Models::Operations::DailyReviewCount), {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("dailyReviewCounts"), required: true}} ) - field( - :flagged_content_trends, - Crystalline::Array.new(Models::Operations::FlaggedContentTrend), - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flaggedContentTrends"), required: true}} - ) - - sig { - params( - daily_review_counts: T::Array[Models::Operations::DailyReviewCount], - flagged_content_trends: T::Array[Models::Operations::FlaggedContentTrend] - ) - .void - } - def initialize(daily_review_counts:, flagged_content_trends:) + sig { params(daily_review_counts: T::Array[Models::Operations::DailyReviewCount]).void } + def initialize(daily_review_counts:) @daily_review_counts = daily_review_counts - @flagged_content_trends = flagged_content_trends end sig { params(other: T.untyped).returns(T::Boolean) } def ==(other) return false unless other.is_a?(self.class) return false unless @daily_review_counts == other.daily_review_counts - return false unless @flagged_content_trends == other.flagged_content_trends true end end diff --git a/lib/moderation_api/models/operations/trends.rbi b/lib/moderation_api/models/operations/trends.rbi index dc464661..36490038 100644 --- a/lib/moderation_api/models/operations/trends.rbi +++ b/lib/moderation_api/models/operations/trends.rbi @@ -11,10 +11,4 @@ class ModerationApi::Models::Operations::Trends def daily_review_counts=(str_) end - - def flagged_content_trends - end - - def flagged_content_trends=(str_) - end end diff --git a/lib/moderation_api/models/operations/unresolvequeueitem_request.rb b/lib/moderation_api/models/operations/unresolvequeueitem_request.rb index 003b3a8d..15f3cb15 100644 --- a/lib/moderation_api/models/operations/unresolvequeueitem_request.rb +++ b/lib/moderation_api/models/operations/unresolvequeueitem_request.rb @@ -11,32 +11,21 @@ class UnresolveQueueItemRequest extend T::Sig include Crystalline::MetadataFields - # The queue ID + # The queue ID. field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} - # The item ID to unresolve + # The item ID to unresolve. field :item_id, ::String, {'path_param': {'field_name': "itemId", 'style': "simple", 'explode': false}} - - field :body, Models::Operations::UnresolveQueueItemRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), {'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}} ) - sig { - params( - id: ::String, - item_id: ::String, - body: Models::Operations::UnresolveQueueItemRequestBody, - project_id: T.nilable(::String) - ) - .void - } - def initialize(id:, item_id:, body:, project_id: nil) + sig { params(id: ::String, item_id: ::String, project_id: T.nilable(::String)).void } + def initialize(id:, item_id:, project_id: nil) @id = id @item_id = item_id - @body = body @project_id = project_id end @@ -45,7 +34,6 @@ def ==(other) return false unless other.is_a?(self.class) return false unless @id == other.id return false unless @item_id == other.item_id - return false unless @body == other.body return false unless @project_id == other.project_id true end diff --git a/lib/moderation_api/models/operations/unresolvequeueitem_request.rbi b/lib/moderation_api/models/operations/unresolvequeueitem_request.rbi index cd64af74..478cafc0 100644 --- a/lib/moderation_api/models/operations/unresolvequeueitem_request.rbi +++ b/lib/moderation_api/models/operations/unresolvequeueitem_request.rbi @@ -18,12 +18,6 @@ class ModerationApi::Models::Operations::UnresolveQueueItemRequest def item_id=(str_) end - def body - end - - def body=(str_) - end - def project_id end diff --git a/lib/moderation_api/models/operations/unresolvequeueitem_requestbody.rbi b/lib/moderation_api/models/operations/unresolvequeueitem_requestbody.rbi deleted file mode 100644 index 406b48e6..00000000 --- a/lib/moderation_api/models/operations/unresolvequeueitem_requestbody.rbi +++ /dev/null @@ -1,14 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::UnresolveQueueItemRequestBody - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::UnresolveQueueItemRequestBody - def comment - end - - def comment=(str_) - end -end diff --git a/lib/moderation_api/models/operations/unresolvequeueitem_responsebody.rb b/lib/moderation_api/models/operations/unresolvequeueitem_responsebody.rb index ccf4e1b2..b580ac05 100644 --- a/lib/moderation_api/models/operations/unresolvequeueitem_responsebody.rb +++ b/lib/moderation_api/models/operations/unresolvequeueitem_responsebody.rb @@ -16,20 +16,32 @@ class UnresolveQueueItemResponseBody Crystalline::Boolean.new, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("success"), required: true}} ) - # New status of the item + # `pending` waits for review. `resolved` is reviewed. field( :status, - ::String, - {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("status"), required: true}} + Models::Operations::UnresolveQueueItemStatus, + { + 'format_json': { + 'letter_case': ::ModerationApi::Utils.field_name("status"), + required: true, + 'decoder': ::ModerationApi::Utils.open_enum_from_string( + Models::Operations::UnresolveQueueItemStatus, + false + ) + } + } ) - # Timestamp when the item was unresolved + # When the item was unresolved (ISO 8601). field( :unresolved_at, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("unresolvedAt"), required: true}} ) - sig { params(success: T::Boolean, status: ::String, unresolved_at: ::String).void } + sig { + params(success: T::Boolean, status: Models::Operations::UnresolveQueueItemStatus, unresolved_at: ::String) + .void + } def initialize(success:, status:, unresolved_at:) @success = success @status = status diff --git a/lib/moderation_api/models/operations/listqueueitems_status.rb b/lib/moderation_api/models/operations/unresolvequeueitem_status.rb similarity index 74% rename from lib/moderation_api/models/operations/listqueueitems_status.rb rename to lib/moderation_api/models/operations/unresolvequeueitem_status.rb index c5b65b3a..1f1cc802 100644 --- a/lib/moderation_api/models/operations/listqueueitems_status.rb +++ b/lib/moderation_api/models/operations/unresolvequeueitem_status.rb @@ -6,8 +6,8 @@ module ModerationApi module Models module Operations - # ListQueueItemsStatus - Status of the item - class ListQueueItemsStatus + # UnresolveQueueItemStatus - `pending` waits for review. `resolved` is reviewed. + class UnresolveQueueItemStatus include ::Crystalline::Enum enums do PENDING = new("pending") diff --git a/lib/moderation_api/models/operations/unresolvequeueitem_status.rbi b/lib/moderation_api/models/operations/unresolvequeueitem_status.rbi new file mode 100644 index 00000000..381e5df9 --- /dev/null +++ b/lib/moderation_api/models/operations/unresolvequeueitem_status.rbi @@ -0,0 +1,9 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::UnresolveQueueItemStatus + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::UnresolveQueueItemStatus +end diff --git a/lib/moderation_api/models/operations/updateaction_request.rb b/lib/moderation_api/models/operations/updateaction_request.rb index c84250f5..e5c52947 100644 --- a/lib/moderation_api/models/operations/updateaction_request.rb +++ b/lib/moderation_api/models/operations/updateaction_request.rb @@ -15,7 +15,7 @@ class UpdateActionRequest field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field :body, Models::Operations::UpdateActionRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/updateauthor_request.rb b/lib/moderation_api/models/operations/updateauthor_request.rb index ee192dae..7443ff80 100644 --- a/lib/moderation_api/models/operations/updateauthor_request.rb +++ b/lib/moderation_api/models/operations/updateauthor_request.rb @@ -15,7 +15,7 @@ class UpdateAuthorRequest field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field :body, Models::Operations::UpdateAuthorRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/updatewebhook_request.rb b/lib/moderation_api/models/operations/updatewebhook_request.rb index ebe5c9b8..3a11a365 100644 --- a/lib/moderation_api/models/operations/updatewebhook_request.rb +++ b/lib/moderation_api/models/operations/updatewebhook_request.rb @@ -15,7 +15,7 @@ class UpdateWebhookRequest field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field :body, Models::Operations::UpdateWebhookRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/updatewordlist_request.rb b/lib/moderation_api/models/operations/updatewordlist_request.rb index 9662b093..0940e6a0 100644 --- a/lib/moderation_api/models/operations/updatewordlist_request.rb +++ b/lib/moderation_api/models/operations/updatewordlist_request.rb @@ -15,7 +15,7 @@ class UpdateWordlistRequest field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}} field :body, Models::Operations::UpdateWordlistRequestBody, {'request': {'media_type': "application/json"}} - # The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + # 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. field( :project_id, Crystalline::Nilable.new(::String), diff --git a/lib/moderation_api/models/operations/updatewordlist_requestbody.rb b/lib/moderation_api/models/operations/updatewordlist_requestbody.rb index 665e148d..b23ad59e 100644 --- a/lib/moderation_api/models/operations/updatewordlist_requestbody.rb +++ b/lib/moderation_api/models/operations/updatewordlist_requestbody.rb @@ -29,7 +29,7 @@ class UpdateWordlistRequestBody Crystalline::Nilable.new(::String), {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description")}} ) - # New words for the wordlist. Replace the existing words with these new ones. Duplicate words will be ignored. + # New words for the wordlist. Replace the existing words with these new ones. Words are converted to lowercase. Duplicate and empty words are ignored. Maximum 5000 words. field( :words, Crystalline::Nilable.new(Crystalline::Array.new(::String)), diff --git a/lib/moderation_api/models/operations/volume.rb b/lib/moderation_api/models/operations/volume.rb new file mode 100644 index 00000000..8f85cbdb --- /dev/null +++ b/lib/moderation_api/models/operations/volume.rb @@ -0,0 +1,76 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +module ModerationApi + module Models + module Operations + + class Volume + extend T::Sig + include Crystalline::MetadataFields + + # Start of the bucket, as an ISO 8601 timestamp in UTC. + field( + :start, + ::String, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("start"), required: true}} + ) + # Requests received in the bucket. + field( + :requests, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("requests"), required: true}} + ) + # Requests flagged in the bucket. + field( + :flagged, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("flagged"), required: true}} + ) + # Requests with the recommendation "reject" in the bucket. + field( + :rejected, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("rejected"), required: true}} + ) + # Requests with the recommendation "review" in the bucket. + field( + :sent_to_review, + ::Integer, + {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("sentToReview"), required: true}} + ) + + sig { + params( + start: ::String, + requests: ::Integer, + flagged: ::Integer, + rejected: ::Integer, + sent_to_review: ::Integer + ) + .void + } + def initialize(start:, requests:, flagged:, rejected:, sent_to_review:) + @start = start + @requests = requests + @flagged = flagged + @rejected = rejected + @sent_to_review = sent_to_review + end + + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other) + return false unless other.is_a?(self.class) + return false unless @start == other.start + return false unless @requests == other.requests + return false unless @flagged == other.flagged + return false unless @rejected == other.rejected + return false unless @sent_to_review == other.sent_to_review + true + end + end + end + end +end diff --git a/lib/moderation_api/models/operations/volume.rbi b/lib/moderation_api/models/operations/volume.rbi new file mode 100644 index 00000000..20328f39 --- /dev/null +++ b/lib/moderation_api/models/operations/volume.rbi @@ -0,0 +1,38 @@ +# typed: true +# frozen_string_literal: true + +class ModerationApi::Models::Operations::Volume + extend ::Crystalline::MetadataFields::ClassMethods +end + +class ModerationApi::Models::Operations::Volume + def start + end + + def start=(str_) + end + + def requests + end + + def requests=(str_) + end + + def flagged + end + + def flagged=(str_) + end + + def rejected + end + + def rejected=(str_) + end + + def sent_to_review + end + + def sent_to_review=(str_) + end +end diff --git a/lib/moderation_api/models/operations/withinunit.rb b/lib/moderation_api/models/operations/withinunit.rb deleted file mode 100644 index b097ee3a..00000000 --- a/lib/moderation_api/models/operations/withinunit.rb +++ /dev/null @@ -1,25 +0,0 @@ -# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -# typed: true -# frozen_string_literal: true - -module ModerationApi - module Models - module Operations - - class WithinUnit - include ::Crystalline::Enum - enums do - MINUTES = new("MINUTES") - HOURS = new("HOURS") - DAYS = new("DAYS") - WEEKS = new("WEEKS") - MONTHS = new("MONTHS") - YEARS = new("YEARS") - end - - open! - end - end - end -end diff --git a/lib/moderation_api/models/operations/withinunit.rbi b/lib/moderation_api/models/operations/withinunit.rbi deleted file mode 100644 index 5412fc9f..00000000 --- a/lib/moderation_api/models/operations/withinunit.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true -# frozen_string_literal: true - -class ModerationApi::Models::Operations::WithinUnit - extend ::Crystalline::MetadataFields::ClassMethods -end - -class ModerationApi::Models::Operations::WithinUnit -end diff --git a/lib/moderation_api/moderationapi.rb b/lib/moderation_api/moderationapi.rb index d53568cd..b6244382 100644 --- a/lib/moderation_api/moderationapi.rb +++ b/lib/moderation_api/moderationapi.rb @@ -18,7 +18,9 @@ class ModerationApi extend T::Sig attr_accessor( + :analytics, :authors, + :feedback, :queue, :actions, :webhooks, @@ -100,7 +102,9 @@ def initialize( sig { void } def init_sdks + @analytics = Analytics.new(@sdk_configuration) @authors = Authors.new(@sdk_configuration) + @feedback = Feedback.new(@sdk_configuration) @queue = Queue.new(@sdk_configuration) @actions = Actions.new(@sdk_configuration) @webhooks = Webhooks.new(@sdk_configuration) diff --git a/lib/moderation_api/projects.rb b/lib/moderation_api/projects.rb index 0eb726b6..7dc08f02 100644 --- a/lib/moderation_api/projects.rb +++ b/lib/moderation_api/projects.rb @@ -17,10 +17,17 @@ module ModerationApi class Projects extend T::Sig + attr_accessor :api_keys sig { params(sdk_config: SDKConfiguration).void } def initialize(sdk_config) @sdk_configuration = sdk_config + init_sdks + end + + sig { void } + def init_sdks + @api_keys = ::ModerationApi::ApiKeys.new(@sdk_configuration) end sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) } diff --git a/lib/moderation_api/queue.rb b/lib/moderation_api/queue.rb index eb527d62..aa6e47ca 100644 --- a/lib/moderation_api/queue.rb +++ b/lib/moderation_api/queue.rb @@ -7,6 +7,7 @@ require "faraday/multipart" require "faraday/retry" require "sorbet-runtime" +require "janeway" require_relative "sdk_hooks/hooks" require_relative "utils/retries" @@ -44,6 +45,322 @@ def get_url(base_url:, url_variables: nil) return Utils.template_url(base_url, url_variables) end + sig { + params( + page: T.nilable(::Integer), + page_size: T.nilable(::Integer), + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::ListQueuesResponse) + } + def list(page: nil, page_size: nil, project_id: nil, timeout_ms: nil, http_headers: nil) + # list - List queues + # List the review queues of the project. The default queue comes first. The list is paginated. To get the item counts of a queue, use `GET /queue/{id}`. + request = Models::Operations::ListQueuesRequest.new( + page: page, + page_size: page_size, + project_id: project_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/queue" + headers = Utils.get_headers(request) + headers = T.cast(headers, T::Hash[String, String]) + query_params = Utils.get_query_params(Models::Operations::ListQueuesRequest, request, nil) + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "listQueues", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).get(url) do |req| + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + req.params = query_params + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Operations::ListQueuesResponseBody) + response = Models::Operations::ListQueuesResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: T.unsafe(obj) + ) + sdk = self + + response.next_page = proc do + request_page = T.must(!request.page.nil? ? request.page : 1) + next_page = request_page + 1 + num_pages = Janeway.enum_for("$.pagination.totalPages", JSON.parse(response_data)).search + if num_pages.nil? || num_pages[0] <= request_page + next nil + end + + if !response_data + next nil + end + + results = Janeway.enum_for("$.data", JSON.parse(response_data)).search + if results.is_a?(Array) + results = results[0] + end + + if results.count.zero? + next nil + end + + request_limit = !request.page_size.nil? ? request.page_size : 20 + if results.count < request_limit + next nil + end + + sdk.list( + page: next_page, + page_size: request.page_size, + project_id: request.project_id, + http_headers: http_headers + ) + end + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["403"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["404"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["500"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + sig { params( id: ::String, @@ -55,7 +372,7 @@ def get_url(base_url:, url_variables: nil) } def retrieve(id:, project_id: nil, timeout_ms: nil, http_headers: nil) # retrieve - Get a queue - # Get a queue + # Get a review queue with its item counts. The counts use the filters and the date window of the queue, the same as the dashboard. request = Models::Operations::GetQueueRequest.new( id: id, project_id: project_id @@ -338,7 +655,7 @@ def retrieve(id:, project_id: nil, timeout_ms: nil, http_headers: nil) } def get_stats(id:, within_days: nil, project_id: nil, timeout_ms: nil, http_headers: nil) # get_stats - Get queue statistics - # Get detailed statistics about a moderation queue including review times, action counts, and trends + # Get review statistics of a queue for a period: resolved and pending items, the top reviewers and the resolved items per day. request = Models::Operations::GetQueueStatsRequest.new( id: id, within_days: within_days, diff --git a/lib/moderation_api/sdkconfiguration.rb b/lib/moderation_api/sdkconfiguration.rb index 87024b23..ae85557b 100644 --- a/lib/moderation_api/sdkconfiguration.rb +++ b/lib/moderation_api/sdkconfiguration.rb @@ -93,9 +93,9 @@ def initialize(client, hooks, retry_config, timeout_ms, secret_key, security_sou @language = "ruby" @openapi_doc_version = "1.1.0" - @sdk_version = "3.1.1" + @sdk_version = "3.2.0" @gen_version = "internal" - @user_agent = "speakeasy-sdk/ruby 3.1.1 internal 1.1.0 moderation_api" + @user_agent = "speakeasy-sdk/ruby 3.2.0 internal 1.1.0 moderation_api" end sig { returns([String, T::Hash[Symbol, String]]) } diff --git a/lib/moderation_api/wordlist.rb b/lib/moderation_api/wordlist.rb index 83bbff0d..afe1f5c9 100644 --- a/lib/moderation_api/wordlist.rb +++ b/lib/moderation_api/wordlist.rb @@ -361,6 +361,230 @@ def list(page: nil, page_size: nil, project_id: nil, timeout_ms: nil, http_heade end end + sig { + params( + body: Models::Operations::CreateWordlistRequestBody, + project_id: T.nilable(::String), + timeout_ms: T.nilable(Integer), + http_headers: T.nilable(T::Hash[T.any(String, Symbol), String]) + ) + .returns(Models::Operations::CreateWordlistResponse) + } + def create(body:, project_id: nil, timeout_ms: nil, http_headers: nil) + # create - Create wordlist + # Create a wordlist in the organization. You can add words now or later. Each word is embedded in the background for similarity matching. Use the embedding status endpoint to follow the progress. To use the wordlist in moderation, add it to a policy. + request = Models::Operations::CreateWordlistRequest.new( + body: body, + project_id: project_id + ) + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/wordlist" + headers = Utils.get_headers(request) + headers = T.cast(headers, T::Hash[String, String]) + req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) + headers["content-type"] = req_content_type + raise StandardError, "request body is required" if data.nil? && form.nil? + + if form && !form.empty? + body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, "application/x-www-form-urlencoded") + body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) + else + body = data + end + + headers["Accept"] = "application/json" + headers["user-agent"] = @sdk_configuration.user_agent + + security = @sdk_configuration.security_source&.call + + timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? + timeout ||= @sdk_configuration.timeout + + connection = @sdk_configuration.client + + hook_ctx = SDKHooks::HookContext.new( + config: @sdk_configuration, + base_url: base_url, + oauth2_scopes: nil, + operation_id: "createWordlist", + security_source: @sdk_configuration.security_source + ) + + error = T.let(nil, T.nilable(StandardError)) + http_response = T.let(nil, T.nilable(Faraday::Response)) + + begin + http_response = T.must(connection).post(url) do |req| + req.body = body + req.headers.merge!(headers) + req.options.timeout = timeout unless timeout.nil? + Utils.configure_request_security(req, security) + http_headers&.each do |key, value| + req.headers[key.to_s] = value + end + + @sdk_configuration.hooks.before_request( + hook_ctx: SDKHooks::BeforeRequestHookContext.new( + hook_ctx: hook_ctx + ), + request: req + ) + end + + rescue StandardError => e + error = e + ensure + if http_response.nil? || Utils.error_status?(http_response.status) + http_response = @sdk_configuration.hooks.after_error( + error: error, + hook_ctx: SDKHooks::AfterErrorHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + else + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + end + + if http_response.nil? + raise error if !error.nil? + raise "no response" + end + end + + content_type = http_response.headers.fetch("Content-Type", "application/octet-stream") + if Utils.match_status_code(http_response.status, ["200"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Operations::CreateWordlistResponseBody) + response = Models::Operations::CreateWordlistResponse.new( + status_code: http_response.status, + content_type: content_type, + raw_response: http_response, + object: T.unsafe(obj) + ) + + return response + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["400"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["401"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["429"]) + if Utils.match_content_type(content_type, "application/json") + http_response = @sdk_configuration.hooks.after_success( + hook_ctx: SDKHooks::AfterSuccessHookContext.new( + hook_ctx: hook_ctx + ), + response: http_response + ) + response_data = http_response.env.response_body + obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError) + obj.raw_response = http_response + raise obj + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown content type received" + ) + end + elsif Utils.match_status_code(http_response.status, ["4XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + elsif Utils.match_status_code(http_response.status, ["5XX"]) + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "API error occurred" + ) + else + raise( + ::ModerationApi::Models::Errors::APIError.new( + status_code: http_response.status, + body: http_response.env.response_body, + raw_response: http_response + ), + "Unknown status code received" + ) + + end + end + sig { params( id: ::String, @@ -655,7 +879,7 @@ def retrieve(id:, project_id: nil, timeout_ms: nil, http_headers: nil) } def update(body:, id:, project_id: nil, timeout_ms: nil, http_headers: nil) # update - Update wordlist - # Update a wordlist + # Update a wordlist. Fields that you do not send stay the same. If you send words, they replace all existing words, and the embeddings are updated in the background. request = Models::Operations::UpdateWordlistRequest.new( id: id, body: body, diff --git a/moderation_api.gemspec b/moderation_api.gemspec index e101cea3..78dd8cd7 100644 --- a/moderation_api.gemspec +++ b/moderation_api.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__) Gem::Specification.new do |s| s.name = 'moderation_api' - s.version = '3.1.1' + s.version = '3.2.0' s.platform = Gem::Platform::RUBY s.licenses = ['Apache-2.0'] s.summary = ''