From ffd75e6e5d980ea2a40d23250f71b378c02235bc Mon Sep 17 00:00:00 2001 From: chrisdengso <8185683+chrisdengso@users.noreply.github.com> Date: Mon, 26 Oct 2026 14:04:30 +0000 Subject: [PATCH] feat: v1.2.0, API changes --- .speakeasy/gen.lock | 929 +- .speakeasy/gen.yaml | 2 +- .speakeasy/openapi.json | 11459 +++++++++------- CHANGELOG.md | 136 + README.md | 66 +- docs/Models/Components/BadRequestErrorCode.md | 14 +- docs/Models/Components/Label.md | 13 + docs/Models/Components/NotFoundErrorCode.md | 22 +- docs/Models/Components/ProjectApiKey.md | 12 + docs/Models/Components/PublicAuthor.md | 2 +- .../{Status.md => PublicAuthorStatus.md} | 2 +- docs/Models/Components/Queue.md | 11 + docs/Models/Components/QueueItem.md | 19 + docs/Models/Components/QueueItemAudio.md | 11 + .../QueueItemBrandImpersonation.md} | 6 +- docs/Models/Components/QueueItemContent.md | 50 + .../Models/Components/QueueItemContentLeaf.md | 41 + .../Components/QueueItemContentLeafAudio.md | 11 + .../Components/QueueItemContentLeafImage.md | 12 + .../Components/QueueItemContentLeafText.md | 11 + .../Components/QueueItemContentLeafVideo.md | 11 + docs/Models/Components/QueueItemImage.md | 12 + docs/Models/Components/QueueItemMatch.md | 16 + docs/Models/Components/QueueItemObject.md | 11 + docs/Models/Components/QueueItemSignals.md | 16 + .../QueueItemStatus.md} | 4 +- docs/Models/Components/QueueItemText.md | 11 + docs/Models/Components/QueueItemVideo.md | 11 + docs/Models/Components/QueueWithCounts.md | 14 + docs/Models/Errors/BadRequestError.md | 18 +- docs/Models/Errors/NotFoundError.md | 18 +- ...ommendationAction.md => ActionResponse.md} | 2 +- docs/Models/Operations/ActionStat.md | 11 - .../Operations/AddWordlistWordsRequest.md | 10 +- docs/Models/Operations/Bucket.md | 11 + docs/Models/Operations/CasebookAgreement.md | 10 - docs/Models/Operations/CasebookAnswer.md | 11 - docs/Models/Operations/Channel.md | 12 + docs/Models/Operations/CheckStatus.md | 10 - docs/Models/Operations/ClassifierOutput.md | 2 +- docs/Models/Operations/CreateActionRequest.md | 8 +- docs/Models/Operations/CreateAuthorRequest.md | 8 +- .../Operations/CreateFeedbackRequest.md | 9 + .../Operations/CreateFeedbackRequestBody.md | 11 + .../Operations/CreateFeedbackResponse.md | 11 + .../Operations/CreateFeedbackResponseBody.md | 11 + docs/Models/Operations/CreateFeedbackType.md | 12 + .../Operations/CreateProjectApiKeyRequest.md | 9 + .../CreateProjectApiKeyRequestBody.md | 8 + .../Operations/CreateProjectApiKeyResponse.md | 11 + .../Models/Operations/CreateWebhookRequest.md | 8 +- .../Operations/CreateWordlistRequest.md | 9 + .../Operations/CreateWordlistRequestBody.md | 11 + .../Operations/CreateWordlistResponse.md | 11 + .../Operations/CreateWordlistResponseBody.md | 16 + docs/Models/Operations/DailyReviewCount.md | 8 +- docs/Models/Operations/DeleteActionRequest.md | 8 +- docs/Models/Operations/DeleteAuthorRequest.md | 8 +- .../Models/Operations/DeleteWebhookRequest.md | 8 +- .../Models/Operations/ExecuteActionRequest.md | 8 +- docs/Models/Operations/Filter.md | 32 - docs/Models/Operations/FilterLabel.md | 11 - docs/Models/Operations/FlagRateSpike.md | 12 + docs/Models/Operations/FlaggedContentTrend.md | 9 - docs/Models/Operations/GetAccountRequest.md | 6 +- docs/Models/Operations/GetActionRequest.md | 8 +- .../Operations/GetAnalyticsAuthorsAuthor.md | 10 + .../GetAnalyticsAuthorsQueryParamRange.md | 13 + .../GetAnalyticsAuthorsRangeResponse.md | 13 + .../Operations/GetAnalyticsAuthorsRequest.md | 11 + .../Operations/GetAnalyticsAuthorsResponse.md | 11 + .../GetAnalyticsAuthorsResponseBody.md | 12 + .../GetAnalyticsAutomationQueryParamRange.md | 13 + .../GetAnalyticsAutomationRangeResponse.md | 13 + .../GetAnalyticsAutomationRequest.md | 10 + .../GetAnalyticsAutomationResponse.md | 11 + .../GetAnalyticsAutomationResponseBody.md | 23 + .../GetAnalyticsChannelsQueryParamRange.md | 13 + .../GetAnalyticsChannelsRangeResponse.md | 13 + .../Operations/GetAnalyticsChannelsRequest.md | 9 + .../GetAnalyticsChannelsResponse.md | 11 + .../GetAnalyticsChannelsResponseBody.md | 11 + .../Operations/GetAnalyticsPoliciesPolicy.md | 10 + .../GetAnalyticsPoliciesQueryParamRange.md | 13 + .../GetAnalyticsPoliciesRangeResponse.md | 13 + .../Operations/GetAnalyticsPoliciesRequest.md | 11 + .../GetAnalyticsPoliciesResponse.md | 11 + .../GetAnalyticsPoliciesResponseBody.md | 12 + .../GetAnalyticsSummaryQueryParamRange.md | 13 + .../GetAnalyticsSummaryRangeResponse.md | 13 + .../Operations/GetAnalyticsSummaryRequest.md | 10 + .../Operations/GetAnalyticsSummaryResponse.md | 11 + .../GetAnalyticsSummaryResponseBody.md | 15 + .../GetAnalyticsVolumesQueryParamRange.md | 13 + .../GetAnalyticsVolumesRangeResponse.md | 13 + .../Operations/GetAnalyticsVolumesRequest.md | 10 + .../Operations/GetAnalyticsVolumesResponse.md | 11 + .../GetAnalyticsVolumesResponseBody.md | 13 + docs/Models/Operations/GetAuthorRequest.md | 8 +- docs/Models/Operations/GetQueueContentType.md | 16 - .../GetQueueRecommendationAction.md | 10 - docs/Models/Operations/GetQueueRequest.md | 8 +- .../Models/Operations/GetQueueResponseBody.md | 6 +- .../Models/Operations/GetQueueStatsRequest.md | 10 +- .../Operations/GetQueueStatsResponseBody.md | 3 +- docs/Models/Operations/GetQueueType.md | 11 - docs/Models/Operations/GetWebhookRequest.md | 8 +- .../Operations/GetWebhookSecretRequest.md | 6 +- .../GetWordlistEmbeddingStatusRequest.md | 8 +- docs/Models/Operations/GetWordlistRequest.md | 8 +- docs/Models/Operations/IsFlagged.md | 11 - .../{SubmitContentLabel.md => Label.md} | 2 +- docs/Models/Operations/ListActionsRequest.md | 12 +- docs/Models/Operations/ListAuthorsRequest.md | 19 +- .../Models/Operations/ListQueueItemsAction.md | 12 - docs/Models/Operations/ListQueueItemsData.md | 18 - docs/Models/Operations/ListQueueItemsLabel.md | 10 - .../Operations/ListQueueItemsRequest.md | 29 +- .../Operations/ListQueueItemsResponseBody.md | 8 +- .../Operations/ListQueueItemsSortDirection.md | 11 - docs/Models/Operations/ListQueuesRequest.md | 10 + docs/Models/Operations/ListQueuesResponse.md | 11 + .../Operations/ListQueuesResponseBody.md | 11 + docs/Models/Operations/ListWebhooksRequest.md | 10 +- .../Models/Operations/ListWordlistsRequest.md | 10 +- docs/Models/Operations/MediaType.md | 12 - docs/Models/Operations/PreviousPeriod.md | 17 + docs/Models/Operations/Queue.md | 14 - docs/Models/Operations/Recommendation.md | 2 +- .../Operations/RemoveWordlistWordsRequest.md | 10 +- .../Operations/ResolveQueueItemRequest.md | 11 +- .../Operations/ResolveQueueItemRequestBody.md | 8 - .../ResolveQueueItemResponseBody.md | 9 +- .../Operations/ResolveQueueItemsRequest.md | 10 + .../ResolveQueueItemsRequestBody.md | 8 + .../Operations/ResolveQueueItemsResponse.md | 11 + .../ResolveQueueItemsResponseBody.md | 11 + docs/Models/Operations/ReviewStats.md | 9 +- docs/Models/Operations/Rule.md | 9 + docs/Models/Operations/Sort.md | 11 + docs/Models/Operations/SortBy.md | 1 - ...thorsSortDirection.md => SortDirection.md} | 2 +- docs/Models/Operations/SortField.md | 10 - docs/Models/Operations/Source.md | 13 + .../{Author.md => SubmitContentAuthor.md} | 2 +- ...onse.md => SubmitContentPolicyResponse.md} | 2 +- .../Models/Operations/SubmitContentRequest.md | 8 +- .../Operations/SubmitContentRequestBody.md | 2 +- .../Operations/SubmitContentResponseBody.md | 4 +- docs/Models/Operations/TopAction.md | 10 - docs/Models/Operations/TopReviewer.md | 13 +- docs/Models/Operations/Totals.md | 18 + docs/Models/Operations/Trends.md | 7 +- .../Operations/UnresolveQueueItemRequest.md | 11 +- .../UnresolveQueueItemRequestBody.md | 8 - .../UnresolveQueueItemResponseBody.md | 10 +- .../Operations/UnresolveQueueItemStatus.md | 11 + docs/Models/Operations/UpdateActionRequest.md | 10 +- docs/Models/Operations/UpdateAuthorRequest.md | 10 +- .../Models/Operations/UpdateWebhookRequest.md | 10 +- .../Operations/UpdateWordlistRequest.md | 10 +- .../Operations/UpdateWordlistRequestBody.md | 14 +- docs/Models/Operations/Volume.md | 12 + docs/Models/Operations/WithinUnit.md | 13 - docs/sdks/account/README.md | 6 +- docs/sdks/actions/README.md | 54 +- docs/sdks/analytics/README.md | 353 + docs/sdks/apikeys/README.md | 63 + docs/sdks/authors/README.md | 36 +- docs/sdks/content/README.md | 8 +- docs/sdks/feedback/README.md | 63 + docs/sdks/items/README.md | 107 +- docs/sdks/queue/README.md | 83 +- docs/sdks/webhooks/README.md | 44 +- docs/sdks/webhooksecret/README.md | 6 +- docs/sdks/wordlist/README.md | 93 +- docs/sdks/words/README.md | 20 +- src/Analytics.php | 937 ++ src/ApiKeys.php | 179 + src/Authors.php | 5 +- src/Feedback.php | 159 + src/Items.php | 173 +- src/Models/Components/BadRequestErrorCode.php | 4 +- src/Models/Components/Label.php | 85 + src/Models/Components/NotFoundErrorCode.php | 2 + src/Models/Components/ProjectApiKey.php | 70 + src/Models/Components/PublicAuthor.php | 10 +- .../{Status.php => PublicAuthorStatus.php} | 2 +- src/Models/Components/Queue.php | 60 + src/Models/Components/QueueItem.php | 144 + src/Models/Components/QueueItemAudio.php | 40 + .../QueueItemBrandImpersonation.php | 38 + .../Components/QueueItemContentLeafAudio.php | 40 + .../Components/QueueItemContentLeafImage.php | 52 + .../Components/QueueItemContentLeafText.php | 40 + .../Components/QueueItemContentLeafVideo.php | 40 + src/Models/Components/QueueItemImage.php | 52 + src/Models/Components/QueueItemMatch.php | 116 + src/Models/Components/QueueItemObject.php | 41 + src/Models/Components/QueueItemSignals.php | 102 + src/Models/Components/QueueItemStatus.php | 17 + src/Models/Components/QueueItemText.php | 40 + src/Models/Components/QueueItemVideo.php | 40 + .../QueueWithCounts.php} | 58 +- src/Models/Errors/BadRequestError.php | 3 +- src/Models/Errors/NotFoundError.php | 1 + ...mendationAction.php => ActionResponse.php} | 2 +- src/Models/Operations/ActionStat.php | 60 - .../Operations/AddWordlistWordsRequest.php | 2 +- ...QueueItemsSortDirection.php => Bucket.php} | 8 +- src/Models/Operations/CasebookAgreement.php | 17 - src/Models/Operations/CasebookAnswer.php | 18 - src/Models/Operations/Channel.php | 70 + src/Models/Operations/CheckStatus.php | 17 - src/Models/Operations/ClassifierOutput.php | 6 +- src/Models/Operations/CreateActionRequest.php | 2 +- src/Models/Operations/CreateAuthorRequest.php | 2 +- .../Operations/CreateFeedbackRequest.php | 39 + .../Operations/CreateFeedbackRequestBody.php | 64 + .../Operations/CreateFeedbackResponse.php | 56 + .../Operations/CreateFeedbackResponseBody.php | 41 + ...ationAction.php => CreateFeedbackType.php} | 9 +- .../Operations/CreateProjectApiKeyRequest.php | 39 + .../CreateProjectApiKeyRequestBody.php | 31 + .../CreateProjectApiKeyResponse.php | 56 + .../Operations/CreateWebhookRequest.php | 2 +- .../Operations/CreateWordlistRequest.php | 39 + .../Operations/CreateWordlistRequestBody.php | 64 + .../Operations/CreateWordlistResponse.php | 56 + .../Operations/CreateWordlistResponseBody.php | 90 + src/Models/Operations/DailyReviewCount.php | 12 +- src/Models/Operations/DeleteActionRequest.php | 2 +- src/Models/Operations/DeleteAuthorRequest.php | 2 +- .../Operations/DeleteWebhookRequest.php | 2 +- .../Operations/ExecuteActionRequest.php | 2 +- src/Models/Operations/Filter.php | 299 - src/Models/Operations/FilterLabel.php | 59 - src/Models/Operations/FlagRateSpike.php | 70 + src/Models/Operations/FlaggedContentTrend.php | 40 - src/Models/Operations/GetAccountRequest.php | 2 +- src/Models/Operations/GetActionRequest.php | 2 +- .../Operations/GetAnalyticsAuthorsAuthor.php | 50 + .../GetAnalyticsAuthorsQueryParamRange.php | 19 + .../GetAnalyticsAuthorsRangeResponse.php | 19 + .../Operations/GetAnalyticsAuthorsRequest.php | 58 + .../GetAnalyticsAuthorsResponse.php | 56 + .../GetAnalyticsAuthorsResponseBody.php | 53 + .../GetAnalyticsAutomationQueryParamRange.php | 19 + .../GetAnalyticsAutomationRangeResponse.php | 19 + .../GetAnalyticsAutomationRequest.php | 49 + .../GetAnalyticsAutomationResponse.php | 56 + .../GetAnalyticsAutomationResponseBody.php | 162 + .../GetAnalyticsChannelsQueryParamRange.php | 19 + .../GetAnalyticsChannelsRangeResponse.php | 19 + .../GetAnalyticsChannelsRequest.php | 40 + .../GetAnalyticsChannelsResponse.php | 56 + .../GetAnalyticsChannelsResponseBody.php | 43 + .../Operations/GetAnalyticsPoliciesPolicy.php | 50 + .../GetAnalyticsPoliciesQueryParamRange.php | 19 + .../GetAnalyticsPoliciesRangeResponse.php | 19 + .../GetAnalyticsPoliciesRequest.php | 58 + .../GetAnalyticsPoliciesResponse.php | 56 + .../GetAnalyticsPoliciesResponseBody.php | 53 + .../GetAnalyticsSummaryQueryParamRange.php | 19 + .../GetAnalyticsSummaryRangeResponse.php | 19 + .../Operations/GetAnalyticsSummaryRequest.php | 49 + .../GetAnalyticsSummaryResponse.php | 56 + .../GetAnalyticsSummaryResponseBody.php | 85 + .../GetAnalyticsVolumesQueryParamRange.php | 19 + .../GetAnalyticsVolumesRangeResponse.php | 19 + .../Operations/GetAnalyticsVolumesRequest.php | 49 + .../GetAnalyticsVolumesResponse.php | 56 + .../GetAnalyticsVolumesResponseBody.php | 64 + src/Models/Operations/GetAuthorRequest.php | 2 +- src/Models/Operations/GetQueueContentType.php | 23 - src/Models/Operations/GetQueueRequest.php | 4 +- .../Operations/GetQueueResponseBody.php | 12 +- .../Operations/GetQueueStatsRequest.php | 4 +- .../Operations/GetQueueStatsResponseBody.php | 15 +- src/Models/Operations/GetQueueType.php | 18 - src/Models/Operations/GetWebhookRequest.php | 2 +- .../Operations/GetWebhookSecretRequest.php | 2 +- .../GetWordlistEmbeddingStatusRequest.php | 2 +- src/Models/Operations/GetWordlistRequest.php | 2 +- src/Models/Operations/IsFlagged.php | 18 - .../{SubmitContentLabel.php => Label.php} | 2 +- src/Models/Operations/ListActionsRequest.php | 2 +- src/Models/Operations/ListAuthorsRequest.php | 20 +- .../Operations/ListQueueItemsAction.php | 72 - src/Models/Operations/ListQueueItemsData.php | 138 - src/Models/Operations/ListQueueItemsLabel.php | 50 - .../Operations/ListQueueItemsRequest.php | 78 +- .../Operations/ListQueueItemsResponseBody.php | 6 +- src/Models/Operations/ListQueuesRequest.php | 48 + src/Models/Operations/ListQueuesResponse.php | 73 + .../Operations/ListQueuesResponseBody.php | 43 + src/Models/Operations/ListWebhooksRequest.php | 2 +- .../Operations/ListWordlistsRequest.php | 2 +- src/Models/Operations/MediaType.php | 19 - src/Models/Operations/MetadataFilter.php | 38 - src/Models/Operations/PreviousPeriod.php | 101 + src/Models/Operations/Recommendation.php | 10 +- .../Operations/RemoveWordlistWordsRequest.php | 2 +- .../Operations/ResolveQueueItemRequest.php | 17 +- .../ResolveQueueItemRequestBody.php | 31 - .../ResolveQueueItemResponseBody.php | 15 +- .../Operations/ResolveQueueItemsRequest.php | 49 + .../ResolveQueueItemsRequestBody.php | 31 + .../Operations/ResolveQueueItemsResponse.php | 56 + .../ResolveQueueItemsResponseBody.php | 42 + src/Models/Operations/ReviewStats.php | 28 +- src/Models/Operations/Rule.php | 40 + .../Operations/{SortField.php => Sort.php} | 9 +- src/Models/Operations/SortBy.php | 1 - ...orsSortDirection.php => SortDirection.php} | 2 +- src/Models/Operations/Source.php | 19 + .../{Author.php => SubmitContentAuthor.php} | 2 +- .../Operations/SubmitContentRequest.php | 2 +- .../Operations/SubmitContentRequestBody.php | 2 +- .../Operations/SubmitContentResponseBody.php | 10 +- src/Models/Operations/TopAction.php | 50 - src/Models/Operations/TopReviewer.php | 64 +- src/Models/Operations/Totals.php | 111 + src/Models/Operations/Trends.php | 15 +- .../Operations/UnresolveQueueItemRequest.php | 17 +- .../UnresolveQueueItemRequestBody.php | 31 - .../UnresolveQueueItemResponseBody.php | 13 +- ...tatus.php => UnresolveQueueItemStatus.php} | 4 +- src/Models/Operations/UpdateActionRequest.php | 2 +- src/Models/Operations/UpdateAuthorRequest.php | 2 +- .../Operations/UpdateWebhookRequest.php | 2 +- .../Operations/UpdateWordlistRequest.php | 2 +- .../Operations/UpdateWordlistRequestBody.php | 2 +- src/Models/Operations/Volume.php | 70 + src/Models/Operations/WithinUnit.php | 20 - src/ModerationApi.php | 6 + src/Projects.php | 3 + src/Queue.php | 205 +- src/SDKConfiguration.php | 4 +- src/Wordlist.php | 114 +- 340 files changed, 15531 insertions(+), 6926 deletions(-) create mode 100644 docs/Models/Components/Label.md create mode 100644 docs/Models/Components/ProjectApiKey.md rename docs/Models/Components/{Status.md => PublicAuthorStatus.md} (89%) create mode 100644 docs/Models/Components/Queue.md create mode 100644 docs/Models/Components/QueueItem.md create mode 100644 docs/Models/Components/QueueItemAudio.md rename docs/Models/{Operations/MetadataFilter.md => Components/QueueItemBrandImpersonation.md} (59%) create mode 100644 docs/Models/Components/QueueItemContent.md create mode 100644 docs/Models/Components/QueueItemContentLeaf.md create mode 100644 docs/Models/Components/QueueItemContentLeafAudio.md create mode 100644 docs/Models/Components/QueueItemContentLeafImage.md create mode 100644 docs/Models/Components/QueueItemContentLeafText.md create mode 100644 docs/Models/Components/QueueItemContentLeafVideo.md create mode 100644 docs/Models/Components/QueueItemImage.md create mode 100644 docs/Models/Components/QueueItemMatch.md create mode 100644 docs/Models/Components/QueueItemObject.md create mode 100644 docs/Models/Components/QueueItemSignals.md rename docs/Models/{Operations/ListQueueItemsStatus.md => Components/QueueItemStatus.md} (64%) create mode 100644 docs/Models/Components/QueueItemText.md create mode 100644 docs/Models/Components/QueueItemVideo.md create mode 100644 docs/Models/Components/QueueWithCounts.md rename docs/Models/Operations/{SubmitContentRecommendationAction.md => ActionResponse.md} (83%) delete mode 100644 docs/Models/Operations/ActionStat.md create mode 100644 docs/Models/Operations/Bucket.md delete mode 100644 docs/Models/Operations/CasebookAgreement.md delete mode 100644 docs/Models/Operations/CasebookAnswer.md create mode 100644 docs/Models/Operations/Channel.md delete mode 100644 docs/Models/Operations/CheckStatus.md create mode 100644 docs/Models/Operations/CreateFeedbackRequest.md create mode 100644 docs/Models/Operations/CreateFeedbackRequestBody.md create mode 100644 docs/Models/Operations/CreateFeedbackResponse.md create mode 100644 docs/Models/Operations/CreateFeedbackResponseBody.md create mode 100644 docs/Models/Operations/CreateFeedbackType.md create mode 100644 docs/Models/Operations/CreateProjectApiKeyRequest.md create mode 100644 docs/Models/Operations/CreateProjectApiKeyRequestBody.md create mode 100644 docs/Models/Operations/CreateProjectApiKeyResponse.md create mode 100644 docs/Models/Operations/CreateWordlistRequest.md create mode 100644 docs/Models/Operations/CreateWordlistRequestBody.md create mode 100644 docs/Models/Operations/CreateWordlistResponse.md create mode 100644 docs/Models/Operations/CreateWordlistResponseBody.md delete mode 100644 docs/Models/Operations/Filter.md delete mode 100644 docs/Models/Operations/FilterLabel.md create mode 100644 docs/Models/Operations/FlagRateSpike.md delete mode 100644 docs/Models/Operations/FlaggedContentTrend.md create mode 100644 docs/Models/Operations/GetAnalyticsAuthorsAuthor.md create mode 100644 docs/Models/Operations/GetAnalyticsAuthorsQueryParamRange.md create mode 100644 docs/Models/Operations/GetAnalyticsAuthorsRangeResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsAuthorsRequest.md create mode 100644 docs/Models/Operations/GetAnalyticsAuthorsResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsAuthorsResponseBody.md create mode 100644 docs/Models/Operations/GetAnalyticsAutomationQueryParamRange.md create mode 100644 docs/Models/Operations/GetAnalyticsAutomationRangeResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsAutomationRequest.md create mode 100644 docs/Models/Operations/GetAnalyticsAutomationResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsAutomationResponseBody.md create mode 100644 docs/Models/Operations/GetAnalyticsChannelsQueryParamRange.md create mode 100644 docs/Models/Operations/GetAnalyticsChannelsRangeResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsChannelsRequest.md create mode 100644 docs/Models/Operations/GetAnalyticsChannelsResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsChannelsResponseBody.md create mode 100644 docs/Models/Operations/GetAnalyticsPoliciesPolicy.md create mode 100644 docs/Models/Operations/GetAnalyticsPoliciesQueryParamRange.md create mode 100644 docs/Models/Operations/GetAnalyticsPoliciesRangeResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsPoliciesRequest.md create mode 100644 docs/Models/Operations/GetAnalyticsPoliciesResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsPoliciesResponseBody.md create mode 100644 docs/Models/Operations/GetAnalyticsSummaryQueryParamRange.md create mode 100644 docs/Models/Operations/GetAnalyticsSummaryRangeResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsSummaryRequest.md create mode 100644 docs/Models/Operations/GetAnalyticsSummaryResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsSummaryResponseBody.md create mode 100644 docs/Models/Operations/GetAnalyticsVolumesQueryParamRange.md create mode 100644 docs/Models/Operations/GetAnalyticsVolumesRangeResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsVolumesRequest.md create mode 100644 docs/Models/Operations/GetAnalyticsVolumesResponse.md create mode 100644 docs/Models/Operations/GetAnalyticsVolumesResponseBody.md delete mode 100644 docs/Models/Operations/GetQueueContentType.md delete mode 100644 docs/Models/Operations/GetQueueRecommendationAction.md delete mode 100644 docs/Models/Operations/GetQueueType.md delete mode 100644 docs/Models/Operations/IsFlagged.md rename docs/Models/Operations/{SubmitContentLabel.md => Label.md} (96%) delete mode 100644 docs/Models/Operations/ListQueueItemsAction.md delete mode 100644 docs/Models/Operations/ListQueueItemsData.md delete mode 100644 docs/Models/Operations/ListQueueItemsLabel.md delete mode 100644 docs/Models/Operations/ListQueueItemsSortDirection.md create mode 100644 docs/Models/Operations/ListQueuesRequest.md create mode 100644 docs/Models/Operations/ListQueuesResponse.md create mode 100644 docs/Models/Operations/ListQueuesResponseBody.md delete mode 100644 docs/Models/Operations/MediaType.md create mode 100644 docs/Models/Operations/PreviousPeriod.md delete mode 100644 docs/Models/Operations/Queue.md delete mode 100644 docs/Models/Operations/ResolveQueueItemRequestBody.md create mode 100644 docs/Models/Operations/ResolveQueueItemsRequest.md create mode 100644 docs/Models/Operations/ResolveQueueItemsRequestBody.md create mode 100644 docs/Models/Operations/ResolveQueueItemsResponse.md create mode 100644 docs/Models/Operations/ResolveQueueItemsResponseBody.md create mode 100644 docs/Models/Operations/Rule.md create mode 100644 docs/Models/Operations/Sort.md rename docs/Models/Operations/{ListAuthorsSortDirection.md => SortDirection.md} (80%) delete mode 100644 docs/Models/Operations/SortField.md create mode 100644 docs/Models/Operations/Source.md rename docs/Models/Operations/{Author.md => SubmitContentAuthor.md} (99%) rename docs/Models/Operations/{PolicyResponse.md => SubmitContentPolicyResponse.md} (92%) delete mode 100644 docs/Models/Operations/TopAction.md create mode 100644 docs/Models/Operations/Totals.md delete mode 100644 docs/Models/Operations/UnresolveQueueItemRequestBody.md create mode 100644 docs/Models/Operations/UnresolveQueueItemStatus.md create mode 100644 docs/Models/Operations/Volume.md delete mode 100644 docs/Models/Operations/WithinUnit.md create mode 100644 docs/sdks/analytics/README.md create mode 100644 docs/sdks/apikeys/README.md create mode 100644 docs/sdks/feedback/README.md create mode 100644 src/Analytics.php create mode 100644 src/ApiKeys.php create mode 100644 src/Feedback.php create mode 100644 src/Models/Components/Label.php create mode 100644 src/Models/Components/ProjectApiKey.php rename src/Models/Components/{Status.php => PublicAuthorStatus.php} (89%) create mode 100644 src/Models/Components/Queue.php create mode 100644 src/Models/Components/QueueItem.php create mode 100644 src/Models/Components/QueueItemAudio.php create mode 100644 src/Models/Components/QueueItemBrandImpersonation.php create mode 100644 src/Models/Components/QueueItemContentLeafAudio.php create mode 100644 src/Models/Components/QueueItemContentLeafImage.php create mode 100644 src/Models/Components/QueueItemContentLeafText.php create mode 100644 src/Models/Components/QueueItemContentLeafVideo.php create mode 100644 src/Models/Components/QueueItemImage.php create mode 100644 src/Models/Components/QueueItemMatch.php create mode 100644 src/Models/Components/QueueItemObject.php create mode 100644 src/Models/Components/QueueItemSignals.php create mode 100644 src/Models/Components/QueueItemStatus.php create mode 100644 src/Models/Components/QueueItemText.php create mode 100644 src/Models/Components/QueueItemVideo.php rename src/Models/{Operations/Queue.php => Components/QueueWithCounts.php} (50%) rename src/Models/Operations/{SubmitContentRecommendationAction.php => ActionResponse.php} (86%) delete mode 100644 src/Models/Operations/ActionStat.php rename src/Models/Operations/{ListQueueItemsSortDirection.php => Bucket.php} (59%) delete mode 100644 src/Models/Operations/CasebookAgreement.php delete mode 100644 src/Models/Operations/CasebookAnswer.php create mode 100644 src/Models/Operations/Channel.php delete mode 100644 src/Models/Operations/CheckStatus.php create mode 100644 src/Models/Operations/CreateFeedbackRequest.php create mode 100644 src/Models/Operations/CreateFeedbackRequestBody.php create mode 100644 src/Models/Operations/CreateFeedbackResponse.php create mode 100644 src/Models/Operations/CreateFeedbackResponseBody.php rename src/Models/Operations/{GetQueueRecommendationAction.php => CreateFeedbackType.php} (50%) create mode 100644 src/Models/Operations/CreateProjectApiKeyRequest.php create mode 100644 src/Models/Operations/CreateProjectApiKeyRequestBody.php create mode 100644 src/Models/Operations/CreateProjectApiKeyResponse.php create mode 100644 src/Models/Operations/CreateWordlistRequest.php create mode 100644 src/Models/Operations/CreateWordlistRequestBody.php create mode 100644 src/Models/Operations/CreateWordlistResponse.php create mode 100644 src/Models/Operations/CreateWordlistResponseBody.php delete mode 100644 src/Models/Operations/Filter.php delete mode 100644 src/Models/Operations/FilterLabel.php create mode 100644 src/Models/Operations/FlagRateSpike.php delete mode 100644 src/Models/Operations/FlaggedContentTrend.php create mode 100644 src/Models/Operations/GetAnalyticsAuthorsAuthor.php create mode 100644 src/Models/Operations/GetAnalyticsAuthorsQueryParamRange.php create mode 100644 src/Models/Operations/GetAnalyticsAuthorsRangeResponse.php create mode 100644 src/Models/Operations/GetAnalyticsAuthorsRequest.php create mode 100644 src/Models/Operations/GetAnalyticsAuthorsResponse.php create mode 100644 src/Models/Operations/GetAnalyticsAuthorsResponseBody.php create mode 100644 src/Models/Operations/GetAnalyticsAutomationQueryParamRange.php create mode 100644 src/Models/Operations/GetAnalyticsAutomationRangeResponse.php create mode 100644 src/Models/Operations/GetAnalyticsAutomationRequest.php create mode 100644 src/Models/Operations/GetAnalyticsAutomationResponse.php create mode 100644 src/Models/Operations/GetAnalyticsAutomationResponseBody.php create mode 100644 src/Models/Operations/GetAnalyticsChannelsQueryParamRange.php create mode 100644 src/Models/Operations/GetAnalyticsChannelsRangeResponse.php create mode 100644 src/Models/Operations/GetAnalyticsChannelsRequest.php create mode 100644 src/Models/Operations/GetAnalyticsChannelsResponse.php create mode 100644 src/Models/Operations/GetAnalyticsChannelsResponseBody.php create mode 100644 src/Models/Operations/GetAnalyticsPoliciesPolicy.php create mode 100644 src/Models/Operations/GetAnalyticsPoliciesQueryParamRange.php create mode 100644 src/Models/Operations/GetAnalyticsPoliciesRangeResponse.php create mode 100644 src/Models/Operations/GetAnalyticsPoliciesRequest.php create mode 100644 src/Models/Operations/GetAnalyticsPoliciesResponse.php create mode 100644 src/Models/Operations/GetAnalyticsPoliciesResponseBody.php create mode 100644 src/Models/Operations/GetAnalyticsSummaryQueryParamRange.php create mode 100644 src/Models/Operations/GetAnalyticsSummaryRangeResponse.php create mode 100644 src/Models/Operations/GetAnalyticsSummaryRequest.php create mode 100644 src/Models/Operations/GetAnalyticsSummaryResponse.php create mode 100644 src/Models/Operations/GetAnalyticsSummaryResponseBody.php create mode 100644 src/Models/Operations/GetAnalyticsVolumesQueryParamRange.php create mode 100644 src/Models/Operations/GetAnalyticsVolumesRangeResponse.php create mode 100644 src/Models/Operations/GetAnalyticsVolumesRequest.php create mode 100644 src/Models/Operations/GetAnalyticsVolumesResponse.php create mode 100644 src/Models/Operations/GetAnalyticsVolumesResponseBody.php delete mode 100644 src/Models/Operations/GetQueueContentType.php delete mode 100644 src/Models/Operations/GetQueueType.php delete mode 100644 src/Models/Operations/IsFlagged.php rename src/Models/Operations/{SubmitContentLabel.php => Label.php} (98%) delete mode 100644 src/Models/Operations/ListQueueItemsAction.php delete mode 100644 src/Models/Operations/ListQueueItemsData.php delete mode 100644 src/Models/Operations/ListQueueItemsLabel.php create mode 100644 src/Models/Operations/ListQueuesRequest.php create mode 100644 src/Models/Operations/ListQueuesResponse.php create mode 100644 src/Models/Operations/ListQueuesResponseBody.php delete mode 100644 src/Models/Operations/MediaType.php delete mode 100644 src/Models/Operations/MetadataFilter.php create mode 100644 src/Models/Operations/PreviousPeriod.php delete mode 100644 src/Models/Operations/ResolveQueueItemRequestBody.php create mode 100644 src/Models/Operations/ResolveQueueItemsRequest.php create mode 100644 src/Models/Operations/ResolveQueueItemsRequestBody.php create mode 100644 src/Models/Operations/ResolveQueueItemsResponse.php create mode 100644 src/Models/Operations/ResolveQueueItemsResponseBody.php create mode 100644 src/Models/Operations/Rule.php rename src/Models/Operations/{SortField.php => Sort.php} (54%) rename src/Models/Operations/{ListAuthorsSortDirection.php => SortDirection.php} (85%) create mode 100644 src/Models/Operations/Source.php rename src/Models/Operations/{Author.php => SubmitContentAuthor.php} (98%) delete mode 100644 src/Models/Operations/TopAction.php create mode 100644 src/Models/Operations/Totals.php delete mode 100644 src/Models/Operations/UnresolveQueueItemRequestBody.php rename src/Models/Operations/{ListQueueItemsStatus.php => UnresolveQueueItemStatus.php} (69%) create mode 100644 src/Models/Operations/Volume.php delete mode 100644 src/Models/Operations/WithinUnit.php diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 2d519b3..66ec400 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 0199302d-9d48-4081-a021-a66e7a11ce41 management: - docChecksum: 38730339aa1da77855e86c169896f12f + docChecksum: ed2fd953cba3e99fb81365252925a0d4 docVersion: 1.1.0 speakeasyVersion: internal generationVersion: internal - releaseVersion: 1.1.1 - configChecksum: fc3cb529f9d6cc0b51976839fc7521ff + releaseVersion: 1.2.0 + configChecksum: 4e4cfea4aa60d3918e951e102b49ec3b repoURL: https://github.com/moderation-api/sdk-php installationURL: https://github.com/moderation-api/sdk-php.git published: true @@ -38,7 +38,7 @@ trackedFiles: docs/Models/Components/AuthenticationErrorCode.md: last_write_checksum: sha1:77a5b839e6e9801a15872fd82d47fd77651016c5 docs/Models/Components/BadRequestErrorCode.md: - last_write_checksum: sha1:f1b2867eb97dd660b63d8c77821b33406e97a1af + last_write_checksum: sha1:e0aa4e35fcb0f270d6680f0b52ae47f2fc7b107c docs/Models/Components/Block.md: last_write_checksum: sha1:334b51a56857c865c3777021eef19c61b8e41b37 docs/Models/Components/Channel.md: @@ -53,12 +53,14 @@ trackedFiles: last_write_checksum: sha1:84d7586419914429a7cd64c837e54bc49896d39d docs/Models/Components/InternalServerErrorCode.md: last_write_checksum: sha1:e1185db311ed62be4492b54700ab93d52c405994 + docs/Models/Components/Label.md: + last_write_checksum: sha1:a21513a8840ddc222e5d6efefb7b8a02f3d2015d docs/Models/Components/Metadata.md: last_write_checksum: sha1:0d91b387d891213f040b8d85ae56b76a57f72d06 docs/Models/Components/Metrics.md: last_write_checksum: sha1:cee03a66b63be4a1ccb2291f3000ed4f3ec1b70f docs/Models/Components/NotFoundErrorCode.md: - last_write_checksum: sha1:4523793c9d6dca2e4324fcc7da4b26b158717544 + last_write_checksum: sha1:44d3ef880fa39aed1c3306b4d053687da9730052 docs/Models/Components/Pagination.md: last_write_checksum: sha1:707a82c6db4d540c11903e6343172c1f79e84e08 docs/Models/Components/Path.md: @@ -67,6 +69,8 @@ trackedFiles: last_write_checksum: sha1:8d2215f0f16d48c277c84e25b3534fc17dd3498f docs/Models/Components/Project.md: last_write_checksum: sha1:4e1138762d9b1c2535fcc30a738c33f367446552 + docs/Models/Components/ProjectApiKey.md: + last_write_checksum: sha1:0fc9714b212e2500e4b8166b672e08d5bbc684b6 docs/Models/Components/ProjectGlobalFlaggingMode.md: last_write_checksum: sha1:5df81293264af4fd845a411be31d7129a6bac840 docs/Models/Components/ProjectWithKey.md: @@ -74,15 +78,51 @@ trackedFiles: docs/Models/Components/ProjectWithKeyGlobalFlaggingMode.md: last_write_checksum: sha1:9ac1725b79bc23fa6b24f25e68c18cac11b44ee7 docs/Models/Components/PublicAuthor.md: - last_write_checksum: sha1:23dae04ac162e26b9a8f8543be3af94d7d5a5efe + last_write_checksum: sha1:d6b26a2bc2272915497970dcd7afb40fe532b9f2 + docs/Models/Components/PublicAuthorStatus.md: + last_write_checksum: sha1:b7d1fa12786387986571db7cc0b22e5d32c6bc05 + docs/Models/Components/Queue.md: + last_write_checksum: sha1:2beff4d4c2ceff7b9f3d7196e8b8e05249566b74 + docs/Models/Components/QueueItem.md: + last_write_checksum: sha1:12aad26aa74df0600dcb2bc512d72fffefc7eb3a + docs/Models/Components/QueueItemAudio.md: + last_write_checksum: sha1:4fdfd0ffb2285b940fa1453812e5d4dbdfdba727 + docs/Models/Components/QueueItemBrandImpersonation.md: + last_write_checksum: sha1:14935fca74e18cdd34f72180a8d2324bd6825fb2 + docs/Models/Components/QueueItemContent.md: + last_write_checksum: sha1:82b1b0e2eebebb3c7921f563fa3101f9fb1f9884 + docs/Models/Components/QueueItemContentLeaf.md: + last_write_checksum: sha1:b983f5b06d0ec1d77e1a86d4749d06a3316ec456 + docs/Models/Components/QueueItemContentLeafAudio.md: + last_write_checksum: sha1:6cf4ec3fb62a7023c2764b6b1904484e1836bb00 + docs/Models/Components/QueueItemContentLeafImage.md: + last_write_checksum: sha1:4bfeddfdcbdc2e89682e3b5dda8f6e3999897804 + docs/Models/Components/QueueItemContentLeafText.md: + last_write_checksum: sha1:81f4315108db9bfb40d9d69b909c675144d0a009 + docs/Models/Components/QueueItemContentLeafVideo.md: + last_write_checksum: sha1:474e935e24b80f49812ae86e2b33ef015a37ac68 + docs/Models/Components/QueueItemImage.md: + last_write_checksum: sha1:50c99f16632e74f2bede6e31af4d5a541788b7b3 + docs/Models/Components/QueueItemMatch.md: + last_write_checksum: sha1:c0bf63977ba1783c861617d33e892c78ad705dd3 + docs/Models/Components/QueueItemObject.md: + last_write_checksum: sha1:24d46931a9c60084f26bf29cd7c2d356870ccfaa + docs/Models/Components/QueueItemSignals.md: + last_write_checksum: sha1:c644f5cd65786e4152739b04570af5b3160958f8 + docs/Models/Components/QueueItemStatus.md: + last_write_checksum: sha1:a1e62f2c9bf207dab3011a727d1197e061721b4f + docs/Models/Components/QueueItemText.md: + last_write_checksum: sha1:5bf728a5cf71f8f7ab383c744033bd2fb40e55cf + docs/Models/Components/QueueItemVideo.md: + last_write_checksum: sha1:aaf022e1665f8bb35e785aba59a9e660b94e1339 + docs/Models/Components/QueueWithCounts.md: + last_write_checksum: sha1:ef13efb32ca53187b196c05ff0be5f237beb8501 docs/Models/Components/RateLimitErrorCode.md: last_write_checksum: sha1:c266e1bff11bcdfcd9b582c21dfafee0aefbaf8b docs/Models/Components/RiskEvaluation.md: last_write_checksum: sha1:2c6086d3c5f78f88dae6b4f3e5012fc433f8c4ce docs/Models/Components/Security.md: last_write_checksum: sha1:268135d3f09db0fbcceecc8523339abbc09eea2e - docs/Models/Components/Status.md: - last_write_checksum: sha1:d05d5d7fb2d0d8e76227fdc1473488892a21427d docs/Models/Components/TranscriptionQuality.md: last_write_checksum: sha1:26d77a6238fd05215deb6ec885d59cc5a0fca64d docs/Models/Components/TrustLevel.md: @@ -90,23 +130,23 @@ trackedFiles: docs/Models/Errors/AuthenticationError.md: last_write_checksum: sha1:19eddc52faa3565fd9b66d39b55e727711eb5b12 docs/Models/Errors/BadRequestError.md: - last_write_checksum: sha1:c31c0f5b7444f18e2ef8b5a6b63d45a6bd411849 + last_write_checksum: sha1:6f3813c727556ab141601f80f10693ff24e90292 docs/Models/Errors/ConflictError.md: last_write_checksum: sha1:b1c7a7a062a6822a0604151f257f401afd969c41 docs/Models/Errors/InternalServerError.md: last_write_checksum: sha1:c3bd0ababafac0c146d2111a72a7dade78719f7b docs/Models/Errors/NotFoundError.md: - last_write_checksum: sha1:e9c31df6f8d3b6787599d6590413b0e3f3ba1253 + last_write_checksum: sha1:2a10580ecacc2b0bae27789a3c3497c45af759b6 docs/Models/Errors/PermissionDeniedError.md: last_write_checksum: sha1:06856791f3e1f92a4be0a82835dad3d7718bbf6b docs/Models/Errors/RateLimitError.md: last_write_checksum: sha1:2b85021bb6d8241e9989a5ba52ed3a24c988de8d docs/Models/Operations/ActionRequest.md: last_write_checksum: sha1:5ac714a0d1c0f2c91ae7a3e650a4313bb615cd0b - docs/Models/Operations/ActionStat.md: - last_write_checksum: sha1:034f55d8bf87a2e062cb242a8da2220c4d0754db + docs/Models/Operations/ActionResponse.md: + last_write_checksum: sha1:044ab5c096f16e2af66549f512e996542d36f43d docs/Models/Operations/AddWordlistWordsRequest.md: - last_write_checksum: sha1:ca66de87647fa35c062d5d758c8a531cb6c7a8a0 + last_write_checksum: sha1:fc1b67e5871bd65e38ac505a624742cbcbd4cd6e docs/Models/Operations/AddWordlistWordsRequestBody.md: last_write_checksum: sha1:5622b3b98b1276644fe08116a626fd2649003632 docs/Models/Operations/AddWordlistWordsResponse.md: @@ -121,8 +161,6 @@ trackedFiles: last_write_checksum: sha1:422b19eb1169a2d5f0d655b8dc1b0cec50ebcc75 docs/Models/Operations/AudioResponse.md: last_write_checksum: sha1:39864502876ca215a0222ab4985ef505179065d2 - docs/Models/Operations/Author.md: - last_write_checksum: sha1:eb4c0ab083e0cfe479bafbbf445cce93831829d7 docs/Models/Operations/AuthorStatus.md: last_write_checksum: sha1:b0ef2f7d21062292a06e059b371adc78b27f8a86 docs/Models/Operations/Behavior.md: @@ -131,20 +169,18 @@ trackedFiles: last_write_checksum: sha1:334b51a56857c865c3777021eef19c61b8e41b37 docs/Models/Operations/BrandImpersonation.md: last_write_checksum: sha1:419b97d0825dbb7453231033af20b5190982c7ad + docs/Models/Operations/Bucket.md: + last_write_checksum: sha1:1867b617a44abdb166764828dfdedd7c741cd976 docs/Models/Operations/Cannabis.md: last_write_checksum: sha1:766668c446499638a04316f33f281a93575e8708 docs/Models/Operations/Casebook.md: last_write_checksum: sha1:cb3add0de0c38e12edcbc7dab87a7aedd83c4246 - docs/Models/Operations/CasebookAgreement.md: - last_write_checksum: sha1:03801c070edd002745210d64d3fd6cdcd6bc25e4 - docs/Models/Operations/CasebookAnswer.md: - last_write_checksum: sha1:e06aa663c44fe2add9c8deda246ff27e22222c60 + docs/Models/Operations/Channel.md: + last_write_checksum: sha1:76bea8e24f0d5b6c876cc7a62f6d3b62c85aa328 docs/Models/Operations/ChannelCircumvention.md: last_write_checksum: sha1:10b4c25d6f6b883eb0bc9a73c1e8e5772d34efa0 - docs/Models/Operations/CheckStatus.md: - last_write_checksum: sha1:7e41290bcc3a78594ad6eb5e3b42dd98245b7c24 docs/Models/Operations/ClassifierOutput.md: - last_write_checksum: sha1:8ed4815a6ea017176a4399c435d4a14adfee14d4 + last_write_checksum: sha1:62a5d56b2884a8ed58ec7a0dd899d254441128f7 docs/Models/Operations/ClientAction.md: last_write_checksum: sha1:f7a802e4e7742bbe296b53f3165e4a19ab4b9f88 docs/Models/Operations/CodeAbuse.md: @@ -174,7 +210,7 @@ trackedFiles: docs/Models/Operations/CreateActionQueueBehaviourResponse.md: last_write_checksum: sha1:97f02c2df095405ae5100f60ce4188c29fb7caa5 docs/Models/Operations/CreateActionRequest.md: - last_write_checksum: sha1:4a89d2021662c1f7974550977d9c6b52651ee038 + last_write_checksum: sha1:306a9b4e3cf77a332ea51d223564ea716ae57123 docs/Models/Operations/CreateActionRequestBody.md: last_write_checksum: sha1:4301b6c396498c2099be259ecba75004e59605b2 docs/Models/Operations/CreateActionResponse.md: @@ -188,7 +224,7 @@ trackedFiles: docs/Models/Operations/CreateAuthorMetadata.md: last_write_checksum: sha1:cf046cd307e8a834bb4b2c4aad5d8031022ba16b docs/Models/Operations/CreateAuthorRequest.md: - last_write_checksum: sha1:f2708d51c0eff657bb2ddceca06dd2c7b50187d4 + last_write_checksum: sha1:576a07adf27cf22a6cff75fea2c6215218de19e3 docs/Models/Operations/CreateAuthorRequestBody.md: last_write_checksum: sha1:99f2d4900c44691cd5d41330c169c5da5ad3b827 docs/Models/Operations/CreateAuthorResponse.md: @@ -201,6 +237,22 @@ trackedFiles: last_write_checksum: sha1:5845cde685b144f1a550724657bbb4678095667d docs/Models/Operations/CreateChannelResponse.md: last_write_checksum: sha1:75149c76721ba5187c331604410351365d587758 + docs/Models/Operations/CreateFeedbackRequest.md: + last_write_checksum: sha1:0517d89c6539e85e3d43f7ffbdf9e4eb5ee4a1e6 + docs/Models/Operations/CreateFeedbackRequestBody.md: + last_write_checksum: sha1:ec8eecd2a412f414adc461f237d343a18bef8ca4 + docs/Models/Operations/CreateFeedbackResponse.md: + last_write_checksum: sha1:30b52fa4ffb22d53dbf7ab628ca73ec67181c0f2 + docs/Models/Operations/CreateFeedbackResponseBody.md: + last_write_checksum: sha1:11999d7c12576672bac1d95639cd312c1dadf0a1 + docs/Models/Operations/CreateFeedbackType.md: + last_write_checksum: sha1:acb15353dd0808e7f6836b2382ae074d2b2716bd + docs/Models/Operations/CreateProjectApiKeyRequest.md: + last_write_checksum: sha1:4c8ab8c412c45258cf49721759536f04804bcc76 + docs/Models/Operations/CreateProjectApiKeyRequestBody.md: + last_write_checksum: sha1:1b43e951d48c5c70929a8eae06cc5645ae685bea + docs/Models/Operations/CreateProjectApiKeyResponse.md: + last_write_checksum: sha1:fe6681d7876dbcfbd0cee5c1de507695d0affddd docs/Models/Operations/CreateProjectRequest.md: last_write_checksum: sha1:0ca1a670b74800679cc1e5891dea64eacc3d061d docs/Models/Operations/CreateProjectResponse.md: @@ -212,13 +264,21 @@ trackedFiles: docs/Models/Operations/CreateWebhookPayloadVersion.md: last_write_checksum: sha1:2014e238e3e3f1e845d0edc6d69b0fc3608d6752 docs/Models/Operations/CreateWebhookRequest.md: - last_write_checksum: sha1:6e4d43f1371567a8e5c47c04562944de66e264f2 + last_write_checksum: sha1:3e34306ea799c4f6c8bddf69cfe19495acd113ca docs/Models/Operations/CreateWebhookRequestBody.md: last_write_checksum: sha1:bf54406bb72b5a2d37bb53813290161db9e58c07 docs/Models/Operations/CreateWebhookResponse.md: last_write_checksum: sha1:39f5f50b291f24e39aede11c8b20a5f6ca0b4718 docs/Models/Operations/CreateWebhookResponseBody.md: last_write_checksum: sha1:03124f2180a434f7aaa38f5e3af317747abdca6e + docs/Models/Operations/CreateWordlistRequest.md: + last_write_checksum: sha1:6bad98958c0e8eefc060763ef526fb98ce3be39c + docs/Models/Operations/CreateWordlistRequestBody.md: + last_write_checksum: sha1:98f9156dd9665a7e44d388e1a01d29299fb741d5 + docs/Models/Operations/CreateWordlistResponse.md: + last_write_checksum: sha1:cb9d4ead42ed319e8da4aab8a0476453be9acd5d + docs/Models/Operations/CreateWordlistResponseBody.md: + last_write_checksum: sha1:8bb197a25f316b6d8efb392e3ee07b604a33eee3 docs/Models/Operations/Crypto.md: last_write_checksum: sha1:ba2c5b59138c8cc0240e03bb150b079b10f466c6 docs/Models/Operations/CuriosityInsight.md: @@ -226,7 +286,7 @@ trackedFiles: docs/Models/Operations/CurrentProject.md: last_write_checksum: sha1:50119b3c929d7353ec6cc1257e468f64280d7b70 docs/Models/Operations/DailyReviewCount.md: - last_write_checksum: sha1:672112ede23c2dbd6ebb73b9cce6894a21d872b3 + last_write_checksum: sha1:d96dbe07ba0464251b61e62fa9ae784db28e6f24 docs/Models/Operations/DataAudio.md: last_write_checksum: sha1:09ea768ec01d5f0fefc4a08cd0857f5dd16bd842 docs/Models/Operations/DataImage.md: @@ -236,13 +296,13 @@ trackedFiles: docs/Models/Operations/DataVideo.md: last_write_checksum: sha1:1299100c36d4060d8c8d125b0ae92f674f94f2a3 docs/Models/Operations/DeleteActionRequest.md: - last_write_checksum: sha1:d2a2b266b2829e578ab34af318a5798167b67d8b + last_write_checksum: sha1:1ba0eb3c86904f7a1a8039bae99874baa393503e docs/Models/Operations/DeleteActionResponse.md: last_write_checksum: sha1:d38fc0330e1c4c6cc4ff4a1f669d76991672d694 docs/Models/Operations/DeleteActionResponseBody.md: last_write_checksum: sha1:9f56d6d9b5dd5c6bdd13d2ea9542bd4b06cc23b5 docs/Models/Operations/DeleteAuthorRequest.md: - last_write_checksum: sha1:ce209f49281f23ddad217c0394543f45596638cc + last_write_checksum: sha1:964eca5e4ba3f3b8e9f5712f35cd56ac669949fe docs/Models/Operations/DeleteAuthorResponse.md: last_write_checksum: sha1:b21b20143ad0f5a3cb2b5f2b3bd5b9592bd32b1f docs/Models/Operations/DeleteAuthorResponseBody.md: @@ -260,7 +320,7 @@ trackedFiles: docs/Models/Operations/DeleteProjectResponseBody.md: last_write_checksum: sha1:0438264cd7fd578d0d7aea8b2b57725304a94be8 docs/Models/Operations/DeleteWebhookRequest.md: - last_write_checksum: sha1:8394ab30c9d0b2019409d776162fe412d08332b9 + last_write_checksum: sha1:72cd36ea03d32b98dbc4b52d4e1f789e79ba874c docs/Models/Operations/DeleteWebhookResponse.md: last_write_checksum: sha1:dbe1e045ca97e7659e8812cf1a2d98e9858b52f3 docs/Models/Operations/DeleteWebhookResponseBody.md: @@ -290,7 +350,7 @@ trackedFiles: docs/Models/Operations/Evaluation.md: last_write_checksum: sha1:4b66033c588178d83a3b3672c9943fe022b512e4 docs/Models/Operations/ExecuteActionRequest.md: - last_write_checksum: sha1:f24f4d64dc5f257f22a12c9e729943ab0d8aa038 + last_write_checksum: sha1:ba51c15455a750d4153362120759a57f3399cfe7 docs/Models/Operations/ExecuteActionRequestBody.md: last_write_checksum: sha1:fec12bfabf9159c95312a01b419137d122841935 docs/Models/Operations/ExecuteActionResponse.md: @@ -301,18 +361,14 @@ trackedFiles: last_write_checksum: sha1:c2ab01a922620b199991d42c26980e988ac6d2e2 docs/Models/Operations/FaceDetection.md: last_write_checksum: sha1:2ba4be6e75379a1f03128fa6df42c67fd8908d46 - docs/Models/Operations/Filter.md: - last_write_checksum: sha1:22b40d896ed83212860b55a52f0edffd9a8ccb54 - docs/Models/Operations/FilterLabel.md: - last_write_checksum: sha1:ff3f68ef41b83fbe797393c2947e9cc92ab92f18 - docs/Models/Operations/FlaggedContentTrend.md: - last_write_checksum: sha1:51d66012e82c5821910cef3cf2fc70bb1495935d + docs/Models/Operations/FlagRateSpike.md: + last_write_checksum: sha1:4b2303c8987a33a95daa7359ce742c6b11371c66 docs/Models/Operations/FlaggingMode.md: last_write_checksum: sha1:84d7586419914429a7cd64c837e54bc49896d39d docs/Models/Operations/Gambling.md: last_write_checksum: sha1:01f2ff59643479cc21a02287d43acd1d62d5b073 docs/Models/Operations/GetAccountRequest.md: - last_write_checksum: sha1:ff6e41ea856cff666dc89a2c4aab97104cc241a1 + last_write_checksum: sha1:20cda15b3eb530ac0cbe5be80fba1cf5b20f347f docs/Models/Operations/GetAccountResponse.md: last_write_checksum: sha1:f5f553b8548a75d4737c98b9e3bf911dc695f15a docs/Models/Operations/GetAccountResponseBody.md: @@ -324,15 +380,79 @@ trackedFiles: docs/Models/Operations/GetActionQueueBehaviour.md: last_write_checksum: sha1:ff0521f4add44128f7fc18833a770be9769dc252 docs/Models/Operations/GetActionRequest.md: - last_write_checksum: sha1:89dec2bc286056e4e7554f1a49e1874802ed1cd2 + last_write_checksum: sha1:c0c7612054b0785f1c8f8af46ad8724896da46f4 docs/Models/Operations/GetActionResponse.md: last_write_checksum: sha1:3de861dd9d7b52b5231033ecd07927f028cda330 docs/Models/Operations/GetActionResponseBody.md: last_write_checksum: sha1:b687bf8ce660b6d8b2dcadefced6a2e0f95e8563 docs/Models/Operations/GetActionType.md: last_write_checksum: sha1:1b45f56d331c400c5135c3af59b9e2cd4141160c + docs/Models/Operations/GetAnalyticsAuthorsAuthor.md: + last_write_checksum: sha1:c0a4a35941dc4b3e30a917120e363651aa4e1298 + docs/Models/Operations/GetAnalyticsAuthorsQueryParamRange.md: + last_write_checksum: sha1:9c61c20fa566a6363513165369ad57313495cf43 + docs/Models/Operations/GetAnalyticsAuthorsRangeResponse.md: + last_write_checksum: sha1:56f3110bdaca93ea0e6d0195c3de591fb1495435 + docs/Models/Operations/GetAnalyticsAuthorsRequest.md: + last_write_checksum: sha1:79dc0437a8f36d45e1630ce9a0c3c66b42f43e35 + docs/Models/Operations/GetAnalyticsAuthorsResponse.md: + last_write_checksum: sha1:053c2ce2b66f2a0c551073690241d4cd436b3e76 + docs/Models/Operations/GetAnalyticsAuthorsResponseBody.md: + last_write_checksum: sha1:373e79091c5137b21d1d74d15cffbd102657898e + docs/Models/Operations/GetAnalyticsAutomationQueryParamRange.md: + last_write_checksum: sha1:4d3c50b9aca3e7c7cba03448f4cc53fb1305eabc + docs/Models/Operations/GetAnalyticsAutomationRangeResponse.md: + last_write_checksum: sha1:414ecce6c01cfddc6b59730b62477cc452a516af + docs/Models/Operations/GetAnalyticsAutomationRequest.md: + last_write_checksum: sha1:be590a5535543366481dd95619d54a6d36aedff3 + docs/Models/Operations/GetAnalyticsAutomationResponse.md: + last_write_checksum: sha1:bedbf0fca1e930f52bb20116be28b6e3cab6771a + docs/Models/Operations/GetAnalyticsAutomationResponseBody.md: + last_write_checksum: sha1:474e346f151300dd33f1f6ce7f00bbc3362cc3b8 + docs/Models/Operations/GetAnalyticsChannelsQueryParamRange.md: + last_write_checksum: sha1:5818572d44bf778e13a7612146b7e0cc47fb632c + docs/Models/Operations/GetAnalyticsChannelsRangeResponse.md: + last_write_checksum: sha1:04388fb20d9d17cf887622a0b113daf7d65f8c52 + docs/Models/Operations/GetAnalyticsChannelsRequest.md: + last_write_checksum: sha1:9ff42ff7c5f8185610ac3400ce838e2bfea8009b + docs/Models/Operations/GetAnalyticsChannelsResponse.md: + last_write_checksum: sha1:d1b7dcf70c3e0da726cba8fa0470f298bf33e576 + docs/Models/Operations/GetAnalyticsChannelsResponseBody.md: + last_write_checksum: sha1:3e36f054deb5c7b92d5cde47b090a825b814326f + docs/Models/Operations/GetAnalyticsPoliciesPolicy.md: + last_write_checksum: sha1:2f88177179f1721418d89524bf39769b711f15da + docs/Models/Operations/GetAnalyticsPoliciesQueryParamRange.md: + last_write_checksum: sha1:321eeeb4e950e389fa04b877a5086d81e83f5e26 + docs/Models/Operations/GetAnalyticsPoliciesRangeResponse.md: + last_write_checksum: sha1:9cf9ba6e988a59e2c3d967cb9d8fe3d05e3322fd + docs/Models/Operations/GetAnalyticsPoliciesRequest.md: + last_write_checksum: sha1:084b6ddd2cd131715bb8884491955db0e3f77d03 + docs/Models/Operations/GetAnalyticsPoliciesResponse.md: + last_write_checksum: sha1:dce8a5a85849b92af9359219fb4bbf6a643a921f + docs/Models/Operations/GetAnalyticsPoliciesResponseBody.md: + last_write_checksum: sha1:fa11cdc47ac3984aa457e69c8d6ee9d995dda540 + docs/Models/Operations/GetAnalyticsSummaryQueryParamRange.md: + last_write_checksum: sha1:96e1c8a6a4930f69bb1f6eb8c9141c9690c38a0d + docs/Models/Operations/GetAnalyticsSummaryRangeResponse.md: + last_write_checksum: sha1:ea04f7f92d7f4ec70ac3ed744f84c1697a1ee175 + docs/Models/Operations/GetAnalyticsSummaryRequest.md: + last_write_checksum: sha1:ab73cb30344095101ba256e67fa1af4370e9eada + docs/Models/Operations/GetAnalyticsSummaryResponse.md: + last_write_checksum: sha1:50893604c95b2b63d6f525e31b43ffb3e56913e8 + docs/Models/Operations/GetAnalyticsSummaryResponseBody.md: + last_write_checksum: sha1:1d81184f9466c89d208e37ae3c29dd1a2a985be8 + docs/Models/Operations/GetAnalyticsVolumesQueryParamRange.md: + last_write_checksum: sha1:873b2566f068505e602fa10c66667c4e786864fb + docs/Models/Operations/GetAnalyticsVolumesRangeResponse.md: + last_write_checksum: sha1:9515fe5f7ed2efe94a75df93ee6a7ea668ab2b6a + docs/Models/Operations/GetAnalyticsVolumesRequest.md: + last_write_checksum: sha1:8a9217f5ea13fa1ef8dba94cc454ac77da748334 + docs/Models/Operations/GetAnalyticsVolumesResponse.md: + last_write_checksum: sha1:73ce75b69b709d139d6b1655d3c1d89c245c2b0a + docs/Models/Operations/GetAnalyticsVolumesResponseBody.md: + last_write_checksum: sha1:2be56277a480d96fbdb31467dd0b758fbb0bf60d docs/Models/Operations/GetAuthorRequest.md: - last_write_checksum: sha1:38eb9602951fb1ff345d471d5b8e9ec835cd353f + last_write_checksum: sha1:78592e436628c6d192e85b614b3c3caeb2e8d5aa docs/Models/Operations/GetAuthorResponse.md: last_write_checksum: sha1:01855737e8ae45cba45c02cbbcbf5227a1daf3c3 docs/Models/Operations/GetChannelRequest.md: @@ -343,48 +463,42 @@ trackedFiles: last_write_checksum: sha1:3f85f0e44a7b08eb93af406b36cff40e922390c6 docs/Models/Operations/GetProjectResponse.md: last_write_checksum: sha1:57d7b2107cc7d2e0753f210dff94211e82e02cc4 - docs/Models/Operations/GetQueueContentType.md: - last_write_checksum: sha1:a8830dfa67fdcecb5aca262abc7ac0a8e2ec34e9 - docs/Models/Operations/GetQueueRecommendationAction.md: - last_write_checksum: sha1:959b206a2f957168b3172b45f9f7fe43e75489b2 docs/Models/Operations/GetQueueRequest.md: - last_write_checksum: sha1:271b0b92ab4c4ee657ce32d288380ab1e41478ff + last_write_checksum: sha1:da3369b3e7590e2a6e4e8d58b11dd255457d5ff5 docs/Models/Operations/GetQueueResponse.md: last_write_checksum: sha1:c87e3d4c8010544370dad7cb6a88faf68547cfba docs/Models/Operations/GetQueueResponseBody.md: - last_write_checksum: sha1:f0f2e26a5b760e481c31045a3e36c4f3cd0e04d0 + last_write_checksum: sha1:07486736c3d54bcd73547aae40f645153f03f850 docs/Models/Operations/GetQueueStatsRequest.md: - last_write_checksum: sha1:9e31575b53c8f1a92296ff425a379da938457bf5 + last_write_checksum: sha1:d3e1e6f065cf161090597586e25f4af9853fc213 docs/Models/Operations/GetQueueStatsResponse.md: last_write_checksum: sha1:590857365e4b87ccd7e77b96d6c1bcc950db6438 docs/Models/Operations/GetQueueStatsResponseBody.md: - last_write_checksum: sha1:47e778b4a1db76bb4a40fc377a03fcf9da1c6165 - docs/Models/Operations/GetQueueType.md: - last_write_checksum: sha1:454e42af9ad0c81c7c989226c9a113adfabc0d3b + last_write_checksum: sha1:ee7294cea0246f274be8b9b5761cb40de0950523 docs/Models/Operations/GetWebhookEventType.md: last_write_checksum: sha1:8286461c90474a38d54a1620466f3c5eabb1995f docs/Models/Operations/GetWebhookPayloadVersion.md: last_write_checksum: sha1:85d85e2b79ffc5dff2bf655e31bc2f841b013343 docs/Models/Operations/GetWebhookRequest.md: - last_write_checksum: sha1:5c0614c58e2807ff94329e7857cf9c3d66f8a0fd + last_write_checksum: sha1:f24b8ba7b24b3fd737e6b303114e721b61bd5810 docs/Models/Operations/GetWebhookResponse.md: last_write_checksum: sha1:f7a91e8cff31fe6519f29202e9824a8ab6389056 docs/Models/Operations/GetWebhookResponseBody.md: last_write_checksum: sha1:48568d4ced96eb856066c723f07633bb14d059a8 docs/Models/Operations/GetWebhookSecretRequest.md: - last_write_checksum: sha1:56a01a4772bf2d0f07b0096a9cac9c8c636114b4 + last_write_checksum: sha1:dc602a4e21a8f9a785a5bd7c23fd5e1c0e3ee287 docs/Models/Operations/GetWebhookSecretResponse.md: last_write_checksum: sha1:6beee2803c94d7222f41c89159eefe81ae9933d7 docs/Models/Operations/GetWebhookSecretResponseBody.md: last_write_checksum: sha1:32b8a9b5a6a45638bd8c3f97a2d231aa0257779f docs/Models/Operations/GetWordlistEmbeddingStatusRequest.md: - last_write_checksum: sha1:16de4e8c9fb1c9e292eaa2104f5bb601a6af53e7 + last_write_checksum: sha1:848d8b8e97f09ec67313e426511b00ac84fe3491 docs/Models/Operations/GetWordlistEmbeddingStatusResponse.md: last_write_checksum: sha1:9c3033144a1b46304107fdfa14a55a55e2ea0904 docs/Models/Operations/GetWordlistEmbeddingStatusResponseBody.md: last_write_checksum: sha1:af312a1202ac03c542339923b8c7a6fb77b58554 docs/Models/Operations/GetWordlistRequest.md: - last_write_checksum: sha1:c42243f43f4696b85c9a67b3a54e08632ac10147 + last_write_checksum: sha1:ddaedc50b8a9eb5b2f05d70ea604f991a095ed11 docs/Models/Operations/GetWordlistResponse.md: last_write_checksum: sha1:6aee57085d2c9c8e6ebb7be6c7995535120227e4 docs/Models/Operations/GetWordlistResponseBody.md: @@ -415,8 +529,8 @@ trackedFiles: last_write_checksum: sha1:ab7b3629fe004f5fde476380993e04999f461684 docs/Models/Operations/Insight.md: last_write_checksum: sha1:687d3363306188f05031fac64a7e85c2de834cb2 - docs/Models/Operations/IsFlagged.md: - last_write_checksum: sha1:485ae6b936c26d2243791b77716775fff9dff379 + docs/Models/Operations/Label.md: + last_write_checksum: sha1:8f15d54c49998708f5e9692a5b81323619caa84c docs/Models/Operations/LanguageInsight.md: last_write_checksum: sha1:1ca64a19c63e220b7984941bb96dc77234a8032e docs/Models/Operations/ListActionsData.md: @@ -428,7 +542,7 @@ trackedFiles: docs/Models/Operations/ListActionsQueueBehaviour.md: last_write_checksum: sha1:2ce17ac10ce3c61b35fb177a088037d9485c9920 docs/Models/Operations/ListActionsRequest.md: - last_write_checksum: sha1:1b52ccd546eca30307537ce73713f1ad955eca80 + last_write_checksum: sha1:e748eaf0e05ab35387e61bd3fd648513750ea1f1 docs/Models/Operations/ListActionsResponse.md: last_write_checksum: sha1:e2be97cbec27c544659baf908d5e9ecb52716229 docs/Models/Operations/ListActionsResponseBody.md: @@ -436,13 +550,11 @@ trackedFiles: docs/Models/Operations/ListActionsType.md: last_write_checksum: sha1:3faa1997dc8d38f0ca9a12309deca30dd193a32b docs/Models/Operations/ListAuthorsRequest.md: - last_write_checksum: sha1:d50641af94e59d90bbe9954253c1abed18607cad + last_write_checksum: sha1:ac12a28f84c434017222c0145279721048ff83f5 docs/Models/Operations/ListAuthorsResponse.md: last_write_checksum: sha1:c94a1efc7f86964a9159fdc8fe1200cbf0dcb62b docs/Models/Operations/ListAuthorsResponseBody.md: last_write_checksum: sha1:343a54799bfc67ae39fd87019a928a7fa501a147 - docs/Models/Operations/ListAuthorsSortDirection.md: - last_write_checksum: sha1:70a60f9fade4ca5a0665baf4ed4c793fc7112252 docs/Models/Operations/ListChannelsRequest.md: last_write_checksum: sha1:e58378442af33101d74b1ece7b43b6967a54d48c docs/Models/Operations/ListChannelsResponse.md: @@ -455,22 +567,18 @@ trackedFiles: last_write_checksum: sha1:08846d0c506db3151e48a76ec76b6ddf3fb9e2c3 docs/Models/Operations/ListProjectsResponseBody.md: last_write_checksum: sha1:c8d8b71e4488fe5cbd4a65320bedd3f250d05c26 - docs/Models/Operations/ListQueueItemsAction.md: - last_write_checksum: sha1:03bfec9a8d17504dc9b4920204ee4b76abc9f443 - docs/Models/Operations/ListQueueItemsData.md: - last_write_checksum: sha1:fddf27625be228aabfcc9a8e49e58c78e888c581 - docs/Models/Operations/ListQueueItemsLabel.md: - last_write_checksum: sha1:57afb1138db827561edd8c574ad01dd7182a3506 docs/Models/Operations/ListQueueItemsRequest.md: - last_write_checksum: sha1:d6d3a426d359dc1aad081185f598feee28741ba5 + last_write_checksum: sha1:d7b0a9c9107084bcaaef547b1d2c001ec3b261b7 docs/Models/Operations/ListQueueItemsResponse.md: last_write_checksum: sha1:76b991316ed29264e755e4415578e9f06a8e0c8f docs/Models/Operations/ListQueueItemsResponseBody.md: - last_write_checksum: sha1:b51737c2b3fa1579aa060e8e2aba9181fd2754bf - docs/Models/Operations/ListQueueItemsSortDirection.md: - last_write_checksum: sha1:3246c6abd1d984c6b1fd067361a9c6a819477ae3 - docs/Models/Operations/ListQueueItemsStatus.md: - last_write_checksum: sha1:995d259ab0de13a8d07a86a3617b9b3cc25f64af + last_write_checksum: sha1:d4a05f41fb259a09830cfbd3afcc15dfc85c5cb6 + docs/Models/Operations/ListQueuesRequest.md: + last_write_checksum: sha1:b98c3355bd51307a19960b2092a595d99439e386 + docs/Models/Operations/ListQueuesResponse.md: + last_write_checksum: sha1:d7adabb29b718f51126582d0693e1c68afb97592 + docs/Models/Operations/ListQueuesResponseBody.md: + last_write_checksum: sha1:9641f9d7da96f7caa0f4261114b99b691237eb39 docs/Models/Operations/ListWebhooksData.md: last_write_checksum: sha1:38ccc106459f0d87d574b06b6b032279de307181 docs/Models/Operations/ListWebhooksEventType.md: @@ -478,7 +586,7 @@ trackedFiles: docs/Models/Operations/ListWebhooksPayloadVersion.md: last_write_checksum: sha1:340572c959aa5cdc165bc4e72868880bd774fd5f docs/Models/Operations/ListWebhooksRequest.md: - last_write_checksum: sha1:db168b3ffdacf5656f09c77fc632197293978094 + last_write_checksum: sha1:77755d67cf3c3396831ebc09dcb05a110e4f753d docs/Models/Operations/ListWebhooksResponse.md: last_write_checksum: sha1:118987580439842a19d35b88f034c175d4b6a0c3 docs/Models/Operations/ListWebhooksResponseBody.md: @@ -486,7 +594,7 @@ trackedFiles: docs/Models/Operations/ListWordlistsData.md: last_write_checksum: sha1:acab4667f14a1aac32b9de3b62c29acdb198bfcb docs/Models/Operations/ListWordlistsRequest.md: - last_write_checksum: sha1:7ccfefbce646271f6bc1a0ecbbc194473d1ce7c3 + last_write_checksum: sha1:b794c36da14f28a3a54cba739344e8439edcab8d docs/Models/Operations/ListWordlistsResponse.md: last_write_checksum: sha1:dbb76da5dc339cbe53a03338ce2ffd51016b59ea docs/Models/Operations/ListWordlistsResponseBody.md: @@ -497,16 +605,12 @@ trackedFiles: last_write_checksum: sha1:9bcc3fa717172c36cd220188fdd741a2997f9533 docs/Models/Operations/MatchedRule.md: last_write_checksum: sha1:108d0cca595b818288048c922cb463419838af9d - docs/Models/Operations/MediaType.md: - last_write_checksum: sha1:f7276717d1706226e0ad85c4cb090ef1369bcc63 docs/Models/Operations/Meta.md: last_write_checksum: sha1:1ca5fca8646bf928f3cd6e44e4fbb92d039f230b docs/Models/Operations/MetaStatus.md: last_write_checksum: sha1:29320e3bfcc6378f4df7b662325eb4e60236b619 docs/Models/Operations/MetaType.md: last_write_checksum: sha1:b51c4f2518149ca7f1a87fc66cdd229ce02fc8fd - docs/Models/Operations/MetadataFilter.md: - last_write_checksum: sha1:2839ce87b0e80c633b739a5511f6281f0c339f76 docs/Models/Operations/Method.md: last_write_checksum: sha1:fd85d8a62435e6580c8d4b2dec0013b8f90d62a0 docs/Models/Operations/Modified.md: @@ -521,42 +625,48 @@ trackedFiles: last_write_checksum: sha1:5fa0cd0629a259da38fd1f7208cb2042586efd23 docs/Models/Operations/PolicyRequest.md: last_write_checksum: sha1:0147baf73bb1c465c9ab15191be013d0869948ac - docs/Models/Operations/PolicyResponse.md: - last_write_checksum: sha1:fd20ea71a31838d0d67e2e4824b6e7d3e38fb3db docs/Models/Operations/Political.md: last_write_checksum: sha1:0b61a6002187619cba151230d9abe575293f0fe8 + docs/Models/Operations/PreviousPeriod.md: + last_write_checksum: sha1:316c525ad78e5ec32550dc324162d7e0303629dd docs/Models/Operations/Profanity.md: last_write_checksum: sha1:8519d169f71f083b03ba229039d4063160c4f723 docs/Models/Operations/Promotion.md: last_write_checksum: sha1:4f98eab398ce8b66eaef4da70b3d050430235278 - docs/Models/Operations/Queue.md: - last_write_checksum: sha1:14c7ce62652b12defc97c82948fefc098f79d2a6 docs/Models/Operations/ReasonCode.md: last_write_checksum: sha1:c36eee5a2f16fa55cc683307415a8b9c19d7b2dd docs/Models/Operations/ReasonCodeEnum.md: last_write_checksum: sha1:18ad353107b85619d4bb580085e74b7e259b016e docs/Models/Operations/Recommendation.md: - last_write_checksum: sha1:8a0a2a3ff358c4599d95b1641d0e34450c1b4ae3 + last_write_checksum: sha1:e993b79a726e21528eadaf98d7fc54a36312fb83 docs/Models/Operations/Religion.md: last_write_checksum: sha1:4dafe8419b1c34e4b9db06ddf46ebf4d2e6a70f2 docs/Models/Operations/RemoveWordlistWordsRequest.md: - last_write_checksum: sha1:eaeb0bd7aed4c9bb1342eeb940dae649ad9ace9a + last_write_checksum: sha1:8f3b76a51ead6c5b93ee5e1dcc22865fcd827915 docs/Models/Operations/RemoveWordlistWordsResponse.md: last_write_checksum: sha1:e0e9b71e5809d6ee4d63070f34a1300c33f0dab5 docs/Models/Operations/RemoveWordlistWordsResponseBody.md: last_write_checksum: sha1:fd7813fca61c3aedd3405949ae1e889bc151239d docs/Models/Operations/ResolveQueueItemRequest.md: - last_write_checksum: sha1:c0aff0ed331152fdaf301b29d8a563ebd92e2a7a - docs/Models/Operations/ResolveQueueItemRequestBody.md: - last_write_checksum: sha1:1800ca9c7d7cfaacca71957bb53adab7cd256fee + last_write_checksum: sha1:f91c967ea892e6f33596bf83208c5e5231ad0fdd docs/Models/Operations/ResolveQueueItemResponse.md: last_write_checksum: sha1:045ce38326d9ff36e7ec593be667cf0fcfc042f8 docs/Models/Operations/ResolveQueueItemResponseBody.md: - last_write_checksum: sha1:99c139020eb912bc9f7b4737fcf030ca1691e598 + last_write_checksum: sha1:47eb283d6cb074a746dd69b2a7acb3d4f4531471 + docs/Models/Operations/ResolveQueueItemsRequest.md: + last_write_checksum: sha1:033c70664e31a9deb0f31992868b67530da3a1a3 + docs/Models/Operations/ResolveQueueItemsRequestBody.md: + last_write_checksum: sha1:0f82d0cc3c9fd7ebf5313da8ad417dc0f0f83362 + docs/Models/Operations/ResolveQueueItemsResponse.md: + last_write_checksum: sha1:8bafedce19f5709c554178c10350c13461e22e99 + docs/Models/Operations/ResolveQueueItemsResponseBody.md: + last_write_checksum: sha1:0d2fc602321205502b6f83dd5dd3b8429f32d547 docs/Models/Operations/RespectInsight.md: last_write_checksum: sha1:bd2d45e1df3eeb9c4be98781dcc625d41892a777 docs/Models/Operations/ReviewStats.md: - last_write_checksum: sha1:d688fa654a4ceec959ae700deb7cd0b33fb922e8 + last_write_checksum: sha1:75cf2e4f65b1c615f59d0f393a6aa4b09be9cf80 + docs/Models/Operations/Rule.md: + last_write_checksum: sha1:3de5bdf1fed649feb519cf492b18b037e81ea796 docs/Models/Operations/Scores.md: last_write_checksum: sha1:c83b10da5cf13a45af72e7fbd45ce5b1a17bb482 docs/Models/Operations/SelfHarm.md: @@ -575,24 +685,28 @@ trackedFiles: last_write_checksum: sha1:c0e6ff6c160c2431d23bbc15f6ea991f576d7cd4 docs/Models/Operations/SignalsResponse.md: last_write_checksum: sha1:ab81434597d9401b483d689acf9cc993b1fd8473 + docs/Models/Operations/Sort.md: + last_write_checksum: sha1:4933f2964f135a5d6b74596b625ff254d35a123b docs/Models/Operations/SortBy.md: - last_write_checksum: sha1:d4af0f6f08da774c39bf552fd971f487c4177d71 - docs/Models/Operations/SortField.md: - last_write_checksum: sha1:0304d58fbe1fabdf861dd30c2bbe226b37f386da + last_write_checksum: sha1:64e38bedd26e4d3fca155a257e6536945f56a453 + docs/Models/Operations/SortDirection.md: + last_write_checksum: sha1:6be3d2aac66adf1c5772c6ecaf4c4c042008a427 + docs/Models/Operations/Source.md: + last_write_checksum: sha1:97a24a93a59e65455f1a9b831d7a6822c3935430 docs/Models/Operations/Spam.md: last_write_checksum: sha1:6e7851776faefff4aa06f857356f1fa018b38023 - docs/Models/Operations/SubmitContentLabel.md: - last_write_checksum: sha1:23f6bbb5dd684a69e94b4f895a421a27e9f52ec4 - docs/Models/Operations/SubmitContentRecommendationAction.md: - last_write_checksum: sha1:b8e9f6a5210ef87c29c7f350ccddfe883e83f605 + docs/Models/Operations/SubmitContentAuthor.md: + last_write_checksum: sha1:2a942587382c5b3909523ba51fafe07cee923be3 + docs/Models/Operations/SubmitContentPolicyResponse.md: + last_write_checksum: sha1:a1a45d2d1e21e2de9c1248b228604f0405194a01 docs/Models/Operations/SubmitContentRequest.md: - last_write_checksum: sha1:9e8360977e279ef42497484f960092589a878ab0 + last_write_checksum: sha1:25fa800fa8548999a79453bdd03304d0c4688a24 docs/Models/Operations/SubmitContentRequestBody.md: - last_write_checksum: sha1:03b70e01abd797ae990c3511fc56fcf1a4c57796 + last_write_checksum: sha1:f0d6bf9cec35a001cd2dffa967bf58d104f8e643 docs/Models/Operations/SubmitContentResponse.md: last_write_checksum: sha1:e9c17f5657f3d9e6ef368d40240b85c53df4dff3 docs/Models/Operations/SubmitContentResponseBody.md: - last_write_checksum: sha1:d1af755e138c76c9dfdf6373ef7505552115f25c + last_write_checksum: sha1:99be7bdfc311d24844239d461b3cae9eacb91c2c docs/Models/Operations/TextRequest.md: last_write_checksum: sha1:f83a68d8eff40ce3a0103fb4ffba61c569570cef docs/Models/Operations/TextResponse.md: @@ -601,18 +715,18 @@ trackedFiles: last_write_checksum: sha1:48e0e8dbf03fab455c137a9bc2c190db3cd722a8 docs/Models/Operations/Tobacco.md: last_write_checksum: sha1:5024622aa1ab377f4b6661faf141f44745a1151e - docs/Models/Operations/TopAction.md: - last_write_checksum: sha1:9723f4322e3fe25122645e65032000eb15a4dd9e docs/Models/Operations/TopReviewer.md: - last_write_checksum: sha1:5625d455c228913b9f9cf83a5fd4f5e18b773e84 + last_write_checksum: sha1:4379ee774eaf156781e8d32a98f59b56caeecdde docs/Models/Operations/Topic.md: last_write_checksum: sha1:c5579bebed791f746e3e72eed6dc66441bc9ecc7 + docs/Models/Operations/Totals.md: + last_write_checksum: sha1:95af28bfb7586ec2cbd61b5c5068974553a8e53b docs/Models/Operations/Toxicity.md: last_write_checksum: sha1:fc36ffa455a1e6c5ffccd0acc21dfaa73f36e010 docs/Models/Operations/TranscriptionQuality.md: last_write_checksum: sha1:26d77a6238fd05215deb6ec885d59cc5a0fca64d docs/Models/Operations/Trends.md: - last_write_checksum: sha1:a5f3e90c67de9d0a757c0e80cd6cf16a2142f780 + last_write_checksum: sha1:f4838ec46977efdd06f7adb8e110258c13ae79a9 docs/Models/Operations/TrustLevel.md: last_write_checksum: sha1:59c7fab1ac94b8a21cebb6f15e753672b4ac8f1f docs/Models/Operations/URLMasking.md: @@ -622,13 +736,13 @@ trackedFiles: docs/Models/Operations/UnicodeSpoofing.md: last_write_checksum: sha1:dcc11bf5e62c90b2ac0c2f11329dfdabd0c205ef docs/Models/Operations/UnresolveQueueItemRequest.md: - last_write_checksum: sha1:d9ef94ad5122c0c79e13462fdd09aa9e1c5cd52f - docs/Models/Operations/UnresolveQueueItemRequestBody.md: - last_write_checksum: sha1:fdb81f1fc9aa95002621d4cbf2379fbe8e289849 + last_write_checksum: sha1:c978170bc5ad02a63805869da25d2d3365b4a2ee docs/Models/Operations/UnresolveQueueItemResponse.md: last_write_checksum: sha1:e28749d8dd7c7f06578dc5822f2b7a293f489bc4 docs/Models/Operations/UnresolveQueueItemResponseBody.md: - last_write_checksum: sha1:a819fea859515de27071231235ad53f758f43308 + last_write_checksum: sha1:76883b13dab78f3bae1e80e1b80ed88ff6a475a0 + docs/Models/Operations/UnresolveQueueItemStatus.md: + last_write_checksum: sha1:6c43dbcfab1f965b8ebc172084726b8f402959a9 docs/Models/Operations/UpdateActionPositionRequest.md: last_write_checksum: sha1:d066a156fcc3dcd62131c01b307ae9412b45a5e9 docs/Models/Operations/UpdateActionPositionResponse.md: @@ -642,7 +756,7 @@ trackedFiles: docs/Models/Operations/UpdateActionQueueBehaviourResponse.md: last_write_checksum: sha1:0120c46dff33f5ff47ce5f561824e42ba45d3dbe docs/Models/Operations/UpdateActionRequest.md: - last_write_checksum: sha1:9a8d6b936481cd896a60ae162e24139e08f141f4 + last_write_checksum: sha1:86d0b2cef38988cd42709fa38bb3ed852c460ccc docs/Models/Operations/UpdateActionRequestBody.md: last_write_checksum: sha1:341d1566c7ce1d4bfa2dad27ac874674cf16c7d8 docs/Models/Operations/UpdateActionResponse.md: @@ -656,7 +770,7 @@ trackedFiles: docs/Models/Operations/UpdateAuthorMetadata.md: last_write_checksum: sha1:4c3c1ddf47f6124a0acdaf8e659a5a9f10485116 docs/Models/Operations/UpdateAuthorRequest.md: - last_write_checksum: sha1:bcf7e447d32a78dbe17e047949c75c43824cb6b6 + last_write_checksum: sha1:9147a3e0389081884c9b63d2c191ac5558b70d67 docs/Models/Operations/UpdateAuthorRequestBody.md: last_write_checksum: sha1:42460753284c620cc42fc696ab49ef61249cd20c docs/Models/Operations/UpdateAuthorResponse.md: @@ -682,7 +796,7 @@ trackedFiles: docs/Models/Operations/UpdateWebhookPayloadVersion.md: last_write_checksum: sha1:a7b148d92f1d18cfb79b16fa3d716ed4593a28d5 docs/Models/Operations/UpdateWebhookRequest.md: - last_write_checksum: sha1:d6478f187cd1f934cbbaa2b38df0a371e872c507 + last_write_checksum: sha1:bf8650ed7174deee3ad48b04927b65a6b653440c docs/Models/Operations/UpdateWebhookRequestBody.md: last_write_checksum: sha1:685106d93400695395ccddb0814d70d2cd054c8f docs/Models/Operations/UpdateWebhookResponse.md: @@ -690,9 +804,9 @@ trackedFiles: docs/Models/Operations/UpdateWebhookResponseBody.md: last_write_checksum: sha1:664bc06a56ec1a03dbaafad9b949bc6d24c2e18d docs/Models/Operations/UpdateWordlistRequest.md: - last_write_checksum: sha1:23291ec9e03a21aae2585bb960307180c9bf6b93 + last_write_checksum: sha1:9342cc6fe33cb40310214de1bd4d8f60d490e5e3 docs/Models/Operations/UpdateWordlistRequestBody.md: - last_write_checksum: sha1:fe8075134703770b447178e9a79e32c053b63a36 + last_write_checksum: sha1:8af1317579d3283c47093f9bd75cfe5893418784 docs/Models/Operations/UpdateWordlistResponse.md: last_write_checksum: sha1:9103fbf7258ff2ce306c9f59f51ae53ce9fdbaf4 docs/Models/Operations/UpdateWordlistResponseBody.md: @@ -707,34 +821,40 @@ trackedFiles: last_write_checksum: sha1:202a5796ffea5f01f156f5daeb1be0a5240b7677 docs/Models/Operations/Violence.md: last_write_checksum: sha1:ae2605755b2dafd5eebe68276bd61abe5ce40003 + docs/Models/Operations/Volume.md: + last_write_checksum: sha1:0f42860c8634eeef4fdcb05b43b106df366547bc docs/Models/Operations/Weapons.md: last_write_checksum: sha1:b7fb9abc8a6e92b1a60e80bbe29e402502e3c85e - docs/Models/Operations/WithinUnit.md: - last_write_checksum: sha1:569a6533d5762727109074fe181f89e0ea99eb6a docs/sdks/account/README.md: - last_write_checksum: sha1:627cabe2358331201ba5169a1e1fc8061601fa98 + last_write_checksum: sha1:edc81d8fb02e7e2f907d5ac8563ad2961cf0d4df docs/sdks/actions/README.md: - last_write_checksum: sha1:cc8aa4c3106eb725d105abe1e0874b2045b0a139 + last_write_checksum: sha1:e507621a42936c296ae03eac2ee068106ba47909 + docs/sdks/analytics/README.md: + last_write_checksum: sha1:47430172462b2cc2a9ca4f0f3487d5137f60e0ab + docs/sdks/apikeys/README.md: + last_write_checksum: sha1:21a124371058a8c58c26e033e3fa4038464f89bc docs/sdks/authors/README.md: - last_write_checksum: sha1:86778df7d7f476fbb4b163bcc15379856da9f9dd + last_write_checksum: sha1:18af7d0f9fc5be9e02dda8fc063870eb02347a0d docs/sdks/channels/README.md: last_write_checksum: sha1:784bad3ada3395f36a632bf3a16f7cd944cb9c5e docs/sdks/content/README.md: - last_write_checksum: sha1:02f75654872e56352232dc3a50d56ed365f6edc1 + last_write_checksum: sha1:79d4af3bc1f4c99ea7df6a1c85e6dd288ff08494 + docs/sdks/feedback/README.md: + last_write_checksum: sha1:c94088099f0c490ede88e5a6e31de669fe2a2cd5 docs/sdks/items/README.md: - last_write_checksum: sha1:afd4c5a33585f96a771a97cba8716b114e94ae47 + last_write_checksum: sha1:2c198ec31dd36ed1088c4c23e511463ad4ed03ca docs/sdks/projects/README.md: last_write_checksum: sha1:867175adea7355b0fa2e9a014b6a62272d188d83 docs/sdks/queue/README.md: - last_write_checksum: sha1:03794862dae3ea5754681ec0cfb1cb5e9336037d + last_write_checksum: sha1:861b5b5f750f12e300bb740f671d24b6776b1651 docs/sdks/webhooks/README.md: - last_write_checksum: sha1:7be9c12ff34316d7bf28d498e2507674f6b8b43b + last_write_checksum: sha1:d4e93656473a51ecd24ff3180275599dfdb08e65 docs/sdks/webhooksecret/README.md: - last_write_checksum: sha1:c58e27014d24521f36998d3d36fd6c9fd382c46a + last_write_checksum: sha1:1b4551ad8328b2553709e01007eb1f1f2656f9fe docs/sdks/wordlist/README.md: - last_write_checksum: sha1:90141a2300cc924e8fe96d088a328390cb987bff + last_write_checksum: sha1:f36eac428751331c3f688e4f177c6df6ced6e976 docs/sdks/words/README.md: - last_write_checksum: sha1:636806c21a727454953ceadd95d96f75e9b92ee2 + last_write_checksum: sha1:3b7fb592b91e8792b8140f9a74b22f68068982ff phpstan.neon: last_write_checksum: sha1:c76cf3ac20b114f85cd6c3b569a6e297d00b4612 phpunit.xml: @@ -747,12 +867,18 @@ trackedFiles: last_write_checksum: sha1:26391ec4892280e1d53af5902ee40e9972024151 src/Actions.php: last_write_checksum: sha1:09b60a8e5784ab74e6fd02d13a167d41bad6df4f + src/Analytics.php: + last_write_checksum: sha1:ee29552223bc73767994879c3b1ecfc041c9abd3 + src/ApiKeys.php: + last_write_checksum: sha1:ab8c7e1f03ca30a732ff145b5675d841931af57c src/Authors.php: - last_write_checksum: sha1:b0c9ee7d6a181d5ec157a538c3bfc46e58aa9c5d + last_write_checksum: sha1:f14f1258fbd0820f47b9c232a09c5ebb0b32b846 src/Channels.php: last_write_checksum: sha1:e21a72abd3bcc3c758a5b6be405a9c9ae913e2f6 src/Content.php: last_write_checksum: sha1:587e1073d70b1ba8b5a127dcba655d7259aa1194 + src/Feedback.php: + last_write_checksum: sha1:9bcf1711ab2b98d185316c243fea74a34e33d949 src/Hooks/AfterErrorContext.php: last_write_checksum: sha1:b345a66e5dcb5c691b2bf573efe1e00f3351d19c src/Hooks/AfterErrorHook.php: @@ -784,11 +910,11 @@ trackedFiles: src/Hooks/TokenResponse.php: last_write_checksum: sha1:4f4b445bf43144d2d423367512caf2ac8f63341d src/Items.php: - last_write_checksum: sha1:4dc815a5ecd35f8f061041824f842740d888f292 + last_write_checksum: sha1:c8457dd9ad091f087674e2a34a9bc8d1b05c11a6 src/Models/Components/AuthenticationErrorCode.php: last_write_checksum: sha1:903736b77081716fb731d0d241fd98149b46eee9 src/Models/Components/BadRequestErrorCode.php: - last_write_checksum: sha1:f082dcf371b056285e05af321dd1a4a52147c426 + last_write_checksum: sha1:de17722e221f05d0729c22f41a91580fdcec89ca src/Models/Components/Block.php: last_write_checksum: sha1:918ae12854bff879ffb2c47d83ffbb3f2538241b src/Models/Components/Channel.php: @@ -803,18 +929,22 @@ trackedFiles: last_write_checksum: sha1:6ecaf0420aa64bfcf5d7b3efed8b59463a172dbf src/Models/Components/InternalServerErrorCode.php: last_write_checksum: sha1:c36e98c51be081cb848c35be081b92c45323c4af + src/Models/Components/Label.php: + last_write_checksum: sha1:3b7a96d222e84622d2038f4ddc0598e45d4a6b7b src/Models/Components/Metadata.php: last_write_checksum: sha1:52a945a0eae66b07095c5a2cdc16b6de488f9a96 src/Models/Components/Metrics.php: last_write_checksum: sha1:74934775960bca9de6dbfde9602044ff605a155e src/Models/Components/NotFoundErrorCode.php: - last_write_checksum: sha1:3d7012243f5c3074106d95cc2ff920c415abdaa7 + last_write_checksum: sha1:74e3b650213b9d2b852d44c0e1fbeb8f8f452247 src/Models/Components/Pagination.php: last_write_checksum: sha1:7ba60cd247dab634581430e335d141743772e8ee src/Models/Components/PermissionDeniedErrorCode.php: last_write_checksum: sha1:709ebf053fdacbbc87ea46cb9d3f5fb9746c2a99 src/Models/Components/Project.php: last_write_checksum: sha1:4c8ff4f14ee36ea43736c54d4c5d55f9ae72d01e + src/Models/Components/ProjectApiKey.php: + last_write_checksum: sha1:0efb8ea755eaa6883eb8179d523ffaf0beff3dc4 src/Models/Components/ProjectGlobalFlaggingMode.php: last_write_checksum: sha1:920d6e4b01b19955391b9f2287ace6ff7ace252f src/Models/Components/ProjectWithKey.php: @@ -822,15 +952,47 @@ trackedFiles: src/Models/Components/ProjectWithKeyGlobalFlaggingMode.php: last_write_checksum: sha1:e387e7c10d0709acdea51ababf3b2725f023db85 src/Models/Components/PublicAuthor.php: - last_write_checksum: sha1:78091317e37f318a77d927c65f87cc33dceafef1 + last_write_checksum: sha1:fecc1b06251ae6e7003663d231503cb3516269f6 + src/Models/Components/PublicAuthorStatus.php: + last_write_checksum: sha1:6df1dd7385009eac258b51bc1791b9f61f72c556 + src/Models/Components/Queue.php: + last_write_checksum: sha1:f5c6fb3b984f03d40685344d53186d761b6927b0 + src/Models/Components/QueueItem.php: + last_write_checksum: sha1:98d038430ecfac2335253f57f3950e8d10f5ab2a + src/Models/Components/QueueItemAudio.php: + last_write_checksum: sha1:7e8618a6988da402fb0c06c892da52e61ba3456c + src/Models/Components/QueueItemBrandImpersonation.php: + last_write_checksum: sha1:7093397bc1de6cdc968b00d797dc96defdaa5d5d + src/Models/Components/QueueItemContentLeafAudio.php: + last_write_checksum: sha1:1b7b9fc2aa88856c044eaad221708c9ab4a99910 + src/Models/Components/QueueItemContentLeafImage.php: + last_write_checksum: sha1:64b4f6730483e17f848a146af6bb31a3fca436b2 + src/Models/Components/QueueItemContentLeafText.php: + last_write_checksum: sha1:d0d18f028193942e410c10daa071064c4e5b8fd6 + src/Models/Components/QueueItemContentLeafVideo.php: + last_write_checksum: sha1:bc31f39f05ac705c4d1da05b4e06b01e3cc7f591 + src/Models/Components/QueueItemImage.php: + last_write_checksum: sha1:6848c3cc80496a546e3ec4d8696404e653a34b08 + src/Models/Components/QueueItemMatch.php: + last_write_checksum: sha1:8cfd202b55f4d969959ce628a845f188d3f05c07 + src/Models/Components/QueueItemObject.php: + last_write_checksum: sha1:8ac824a7bbb17cad26a268ab917aedd2abc3f1be + src/Models/Components/QueueItemSignals.php: + last_write_checksum: sha1:2f1bc7297810f369f846af450239a604a3812132 + src/Models/Components/QueueItemStatus.php: + last_write_checksum: sha1:bdcfdd511a3dffb6f12bcb781730b2a79839e2fe + src/Models/Components/QueueItemText.php: + last_write_checksum: sha1:05175b467c19018dcb58d7220c592c81fe2eeac7 + src/Models/Components/QueueItemVideo.php: + last_write_checksum: sha1:c2441f89338480db0ebca48433f2dd2e977a8f1f + src/Models/Components/QueueWithCounts.php: + last_write_checksum: sha1:ca5acc6d09ff33876ab5d8176a03447b5f662281 src/Models/Components/RateLimitErrorCode.php: last_write_checksum: sha1:844cbcc3afeff81426880edb1445ac4fdbf08613 src/Models/Components/RiskEvaluation.php: last_write_checksum: sha1:49a38c3eb6ea96e34f353860d97703e6ae0da584 src/Models/Components/Security.php: last_write_checksum: sha1:259f5fd4b048adbf06d0d4ca022f632ddb5dfc16 - src/Models/Components/Status.php: - last_write_checksum: sha1:58e963ea8cf114f1a005f277b6a8597abfd721ac src/Models/Components/TranscriptionQuality.php: last_write_checksum: sha1:accc4f0a36f22f8c74c95f3cc17101090619516c src/Models/Components/TrustLevel.php: @@ -842,7 +1004,7 @@ trackedFiles: src/Models/Errors/AuthenticationErrorThrowable.php: last_write_checksum: sha1:bacbc1ed3f9c68f87ba17890ec68903fb586ad38 src/Models/Errors/BadRequestError.php: - last_write_checksum: sha1:3a4085c29360ca3b3ad39b59f7012abb1218a512 + last_write_checksum: sha1:ad938e9ec75c959c1d4c33d9696dde470166dbea src/Models/Errors/BadRequestErrorThrowable.php: last_write_checksum: sha1:e61d38061c476360d7d4816f2dfbc45d2f3c6758 src/Models/Errors/ConflictError.php: @@ -854,7 +1016,7 @@ trackedFiles: src/Models/Errors/InternalServerErrorThrowable.php: last_write_checksum: sha1:2ef03a0dbbd8bfb8a2d4b534ef63adee8c3e88d2 src/Models/Errors/NotFoundError.php: - last_write_checksum: sha1:bdf5b62cf2ba96c8dfbb50780ef7deac20393247 + last_write_checksum: sha1:6c38efdb30647613cbb004f7752d49a2129d61bd src/Models/Errors/NotFoundErrorThrowable.php: last_write_checksum: sha1:b774c27ab506ce7cc11f8657988a21cfa26e13ad src/Models/Errors/PermissionDeniedError.php: @@ -867,10 +1029,10 @@ trackedFiles: last_write_checksum: sha1:93aaaa67e9cc3c4ba33bf8bb8ef9663ae9c2b5b6 src/Models/Operations/ActionRequest.php: last_write_checksum: sha1:8312d9ffd54e9dc741d50147872a1b4765bf2454 - src/Models/Operations/ActionStat.php: - last_write_checksum: sha1:044f1a6cf8fd19215358b3a711d6d4cc1d0637b3 + src/Models/Operations/ActionResponse.php: + last_write_checksum: sha1:4f8fe0650988abde33dc8c001817543231cf1942 src/Models/Operations/AddWordlistWordsRequest.php: - last_write_checksum: sha1:88167e4e1c8fd124c54f665ea8d86dbc3d644f26 + last_write_checksum: sha1:83b431ff6f2e69d90a3d6ca523e1a1dd06491a37 src/Models/Operations/AddWordlistWordsRequestBody.php: last_write_checksum: sha1:cd9c142857de573a2d6af9837fba2309816ea0cd src/Models/Operations/AddWordlistWordsResponse.php: @@ -885,8 +1047,6 @@ trackedFiles: last_write_checksum: sha1:15aee9a8a6e255b6c2f33b113ea61dd2e9cc8a2a src/Models/Operations/AudioResponse.php: last_write_checksum: sha1:aeacdffb737fbd3671657f52a01e4df840f1530d - src/Models/Operations/Author.php: - last_write_checksum: sha1:45eed73261a08b157ce44d60d6efb2774a886f27 src/Models/Operations/AuthorStatus.php: last_write_checksum: sha1:a0e6790c923776952fcc3298bda4a14ad287d0cd src/Models/Operations/Behavior.php: @@ -895,20 +1055,18 @@ trackedFiles: last_write_checksum: sha1:75526ef624ec34529e56e0200dcefa281a58911f src/Models/Operations/BrandImpersonation.php: last_write_checksum: sha1:250e4cb1e589d9cff3b6df3e2bc25f25bda7308b + src/Models/Operations/Bucket.php: + last_write_checksum: sha1:825bf862612fba17b135dcbd2714972efbdc861b src/Models/Operations/Cannabis.php: last_write_checksum: sha1:7f9e084cd732b9e4b55ecb053c652f2d043d0d90 src/Models/Operations/Casebook.php: last_write_checksum: sha1:3686a4cd467890504006ab214de5396bca710dc6 - src/Models/Operations/CasebookAgreement.php: - last_write_checksum: sha1:c0cc60f6424be0a06dbcf1db2a84b1861f3f2e9e - src/Models/Operations/CasebookAnswer.php: - last_write_checksum: sha1:6281cf630a762980c2f018b977301fa90571e31b + src/Models/Operations/Channel.php: + last_write_checksum: sha1:d758555d120268dbd80488bc0a5dbaacfbbc18d4 src/Models/Operations/ChannelCircumvention.php: last_write_checksum: sha1:7aefc50bbf0ac23f677ab41942cb608dac50cfed - src/Models/Operations/CheckStatus.php: - last_write_checksum: sha1:93e3f845fc705bafe940906d01792c637c72157f src/Models/Operations/ClassifierOutput.php: - last_write_checksum: sha1:778483ec70336efd69a43b2030225ff89e5c2697 + last_write_checksum: sha1:40fb4cb86b826303cf5e2141b69cc41e41293314 src/Models/Operations/ClientAction.php: last_write_checksum: sha1:77b17fccf1b278bd35aaec872b9b2d71e059ecf5 src/Models/Operations/CodeAbuse.php: @@ -932,7 +1090,7 @@ trackedFiles: src/Models/Operations/CreateActionQueueBehaviourResponse.php: last_write_checksum: sha1:313bcd625e89178af4d06de97282b56f2f23380b src/Models/Operations/CreateActionRequest.php: - last_write_checksum: sha1:79560591ded44d12574eb1c6c71402e172ffeb5b + last_write_checksum: sha1:278ddaf315cba81465ea37977bf214dccadde7e7 src/Models/Operations/CreateActionRequestBody.php: last_write_checksum: sha1:b3bf78b8e42667c7a73faed04293f2ef93d570e7 src/Models/Operations/CreateActionResponse.php: @@ -946,7 +1104,7 @@ trackedFiles: src/Models/Operations/CreateAuthorMetadata.php: last_write_checksum: sha1:87d57a17914c29041de19c2bb4138a822ed24744 src/Models/Operations/CreateAuthorRequest.php: - last_write_checksum: sha1:79b0e48646ed4687cd0ae848488e770749f0a11d + last_write_checksum: sha1:0d0add0ce37b7d13e79859ca4ecb5f7c78c74af1 src/Models/Operations/CreateAuthorRequestBody.php: last_write_checksum: sha1:9bc05523bef9bdd6028286dc922ac81391b447bd src/Models/Operations/CreateAuthorResponse.php: @@ -959,6 +1117,22 @@ trackedFiles: last_write_checksum: sha1:6704da4d885154485ef3ba6ed76b04e1091113f3 src/Models/Operations/CreateChannelResponse.php: last_write_checksum: sha1:9311e697bd0392f5132c1569d567710854e3052b + src/Models/Operations/CreateFeedbackRequest.php: + last_write_checksum: sha1:4748033510cd31d87322816d07d53793fd04e25d + src/Models/Operations/CreateFeedbackRequestBody.php: + last_write_checksum: sha1:1a850733eb08a8e3b6a644ae00772ecfa71fa31d + src/Models/Operations/CreateFeedbackResponse.php: + last_write_checksum: sha1:4a67eb1723cc4662481008c9380b141db7d64c14 + src/Models/Operations/CreateFeedbackResponseBody.php: + last_write_checksum: sha1:441b166e0a24f2a699a96cf8c5841f50bc59f13b + src/Models/Operations/CreateFeedbackType.php: + last_write_checksum: sha1:d2ec6a89d55e7cb5051d68509ae308afdfbb7bb4 + src/Models/Operations/CreateProjectApiKeyRequest.php: + last_write_checksum: sha1:232cc7e9cadf4666da5e4568a04fdef21f24b33d + src/Models/Operations/CreateProjectApiKeyRequestBody.php: + last_write_checksum: sha1:f6a0a9f54cbba3a2a56b94a6c0a4a5e0922d5114 + src/Models/Operations/CreateProjectApiKeyResponse.php: + last_write_checksum: sha1:33a97f6ac8444cd793731409da701f6bedcbe038 src/Models/Operations/CreateProjectRequest.php: last_write_checksum: sha1:0030064ee218a8e52d9c66c4054355045f749cad src/Models/Operations/CreateProjectResponse.php: @@ -970,13 +1144,21 @@ trackedFiles: src/Models/Operations/CreateWebhookPayloadVersion.php: last_write_checksum: sha1:dcddf61864e95fb647b43c892473995e7feb2560 src/Models/Operations/CreateWebhookRequest.php: - last_write_checksum: sha1:4dc8fa0726b9d26ee1a4acff88cbc50e4e4b1679 + last_write_checksum: sha1:1570f1098ea25b9ce76b2955e9a480b495d1830a src/Models/Operations/CreateWebhookRequestBody.php: last_write_checksum: sha1:c75c8528cdf902ab4d2e81f4b576a6a3e4cf7267 src/Models/Operations/CreateWebhookResponse.php: last_write_checksum: sha1:a321682cb48fb638a686cc1bbfe4d03fb5b522e2 src/Models/Operations/CreateWebhookResponseBody.php: last_write_checksum: sha1:ef378179a3c6bf0fa3f18a66311cc769c54704e8 + src/Models/Operations/CreateWordlistRequest.php: + last_write_checksum: sha1:3e7fcffc1cc9fa3e05d365c0638cb8c2b972c9f6 + src/Models/Operations/CreateWordlistRequestBody.php: + last_write_checksum: sha1:764a6de85930feb90fb5d25ca1b629b36c7722e6 + src/Models/Operations/CreateWordlistResponse.php: + last_write_checksum: sha1:d166c5cc5def945bd938785e29489ef31ab098db + src/Models/Operations/CreateWordlistResponseBody.php: + last_write_checksum: sha1:6bef25ddeba16fca75bad1c16080620421a9536b src/Models/Operations/Crypto.php: last_write_checksum: sha1:018573196850196e65ade490d6c0a8d6e84f417a src/Models/Operations/CuriosityInsight.php: @@ -984,7 +1166,7 @@ trackedFiles: src/Models/Operations/CurrentProject.php: last_write_checksum: sha1:4c53463c4a8f542feb2da63296705b49b058a47e src/Models/Operations/DailyReviewCount.php: - last_write_checksum: sha1:55cbef99c63aa2299daf7b76d4d7de29a46f374a + last_write_checksum: sha1:483d4f6bb4d5282773a9174cd6413945cad8fa1d src/Models/Operations/DataAudio.php: last_write_checksum: sha1:bb5559d0b15405a2423f731caceb604379fd8c32 src/Models/Operations/DataImage.php: @@ -994,13 +1176,13 @@ trackedFiles: src/Models/Operations/DataVideo.php: last_write_checksum: sha1:4dccc253a0c8b286d38af7d806d11d8be7788ecc src/Models/Operations/DeleteActionRequest.php: - last_write_checksum: sha1:45c9a051e3b5827f8e68481d87c6a95bac26221b + last_write_checksum: sha1:db542d7f10566f576a5a03ff0ca7022960879f00 src/Models/Operations/DeleteActionResponse.php: last_write_checksum: sha1:f2bf397d8a5338926aa4b7c210111a38e673c91b src/Models/Operations/DeleteActionResponseBody.php: last_write_checksum: sha1:1d484357e5d39e48a6c3f421fa2d9d817f0b4c68 src/Models/Operations/DeleteAuthorRequest.php: - last_write_checksum: sha1:b847a944d9c673fdcbad8c9fc0b9e52f37c92ce3 + last_write_checksum: sha1:bdb3de06b63b1ea7805b9ae2b0b5e7bedf773a31 src/Models/Operations/DeleteAuthorResponse.php: last_write_checksum: sha1:c8ebb0b3287231ba23751000d2ef94f795b97cfa src/Models/Operations/DeleteAuthorResponseBody.php: @@ -1018,7 +1200,7 @@ trackedFiles: src/Models/Operations/DeleteProjectResponseBody.php: last_write_checksum: sha1:f2e3f57e6e1c383dd374647b95d31bfec55f51e9 src/Models/Operations/DeleteWebhookRequest.php: - last_write_checksum: sha1:7db3fa98d22df81339470990fbcad2847c03b22a + last_write_checksum: sha1:8a867b026d229f0a3d247ba595bc1585dea1e486 src/Models/Operations/DeleteWebhookResponse.php: last_write_checksum: sha1:c02adbc6a20d61a9bef2a7e3a54f921be157e72d src/Models/Operations/DeleteWebhookResponseBody.php: @@ -1048,7 +1230,7 @@ trackedFiles: src/Models/Operations/Evaluation.php: last_write_checksum: sha1:a63ce92e36cae2dc2be9305d04d3893d6a442ee4 src/Models/Operations/ExecuteActionRequest.php: - last_write_checksum: sha1:12e7e2038d7b6a142c859e11576845c036d95977 + last_write_checksum: sha1:ad852b1645811a78be00900705b5d423a5c1df9b src/Models/Operations/ExecuteActionRequestBody.php: last_write_checksum: sha1:3136009ab309a9f9b23a6618f6357cf8bcfe9351 src/Models/Operations/ExecuteActionResponse.php: @@ -1059,18 +1241,14 @@ trackedFiles: last_write_checksum: sha1:0ce414a69024c1aabced5e8119d1b1acff0679c2 src/Models/Operations/FaceDetection.php: last_write_checksum: sha1:93001dff7a776387ae93909da1740033f55f99be - src/Models/Operations/Filter.php: - last_write_checksum: sha1:b3d50ea902dff5fb07161fe45e06ed6e9c9f805e - src/Models/Operations/FilterLabel.php: - last_write_checksum: sha1:e20c63a35171dc1ed6825b482733b5184553eb29 - src/Models/Operations/FlaggedContentTrend.php: - last_write_checksum: sha1:432595f2a65a5c733a76d4ee50cee579112462d3 + src/Models/Operations/FlagRateSpike.php: + last_write_checksum: sha1:0a43c851546a171c8be2bbd69dcd38436f22f5e6 src/Models/Operations/FlaggingMode.php: last_write_checksum: sha1:46ef364d7538d4218ea41268c2480610c76ef0a1 src/Models/Operations/Gambling.php: last_write_checksum: sha1:ce701dbd4fd3f3a2aaa509fbe1dc62e37b0cecc8 src/Models/Operations/GetAccountRequest.php: - last_write_checksum: sha1:11c77490927e296bcee419651454becbcce62f45 + last_write_checksum: sha1:750f2ffa80d153b07fcad95804b09b442a496053 src/Models/Operations/GetAccountResponse.php: last_write_checksum: sha1:d8b431f1ea282814bdfc9ca80f068f39a5074d56 src/Models/Operations/GetAccountResponseBody.php: @@ -1082,15 +1260,79 @@ trackedFiles: src/Models/Operations/GetActionQueueBehaviour.php: last_write_checksum: sha1:ae630aa7d41eec1848123c9af1e901e48ce11e7c src/Models/Operations/GetActionRequest.php: - last_write_checksum: sha1:4ad67307bafe60b947d8129d00a0d51118024db5 + last_write_checksum: sha1:d92a2766ef799ce2f0365a77d508ed802c9f1c62 src/Models/Operations/GetActionResponse.php: last_write_checksum: sha1:baae3308fb5aa12a98b02595dcbdd3a48f75b959 src/Models/Operations/GetActionResponseBody.php: last_write_checksum: sha1:fe954fdb97b25056b16e3ad9fafc8e9272b0c019 src/Models/Operations/GetActionType.php: last_write_checksum: sha1:fcf2c33e09f6c896fded285f64d4bed9548c185a + src/Models/Operations/GetAnalyticsAuthorsAuthor.php: + last_write_checksum: sha1:afc4202f689c51a0f6aec66ddd56a454962a33e6 + src/Models/Operations/GetAnalyticsAuthorsQueryParamRange.php: + last_write_checksum: sha1:3603be8c3cf8f0e86063bf2f4470171017f37492 + src/Models/Operations/GetAnalyticsAuthorsRangeResponse.php: + last_write_checksum: sha1:c7a13932d32423108b2348d1d21962b954d65c69 + src/Models/Operations/GetAnalyticsAuthorsRequest.php: + last_write_checksum: sha1:07e38179e97d4cac79a483c62439a97ee09186b3 + src/Models/Operations/GetAnalyticsAuthorsResponse.php: + last_write_checksum: sha1:87c1f27d721ac73ba92eab09ec4d393f747d06d2 + src/Models/Operations/GetAnalyticsAuthorsResponseBody.php: + last_write_checksum: sha1:c0fe72df65924cdeff9543cf19126492bd117d02 + src/Models/Operations/GetAnalyticsAutomationQueryParamRange.php: + last_write_checksum: sha1:ff1d360cc27b7f5f09e78a99c3b6b4d1f60011a5 + src/Models/Operations/GetAnalyticsAutomationRangeResponse.php: + last_write_checksum: sha1:35f9e64dd37b190867b7d2198d8df1c7460724a1 + src/Models/Operations/GetAnalyticsAutomationRequest.php: + last_write_checksum: sha1:000df8a4cf5b8f86194de49485adba7217b36798 + src/Models/Operations/GetAnalyticsAutomationResponse.php: + last_write_checksum: sha1:9a94dc64e7d93693396becb6bfd45daa413c8c1a + src/Models/Operations/GetAnalyticsAutomationResponseBody.php: + last_write_checksum: sha1:8d759407963884a8022c21acfafb40068301b46b + src/Models/Operations/GetAnalyticsChannelsQueryParamRange.php: + last_write_checksum: sha1:db54d9e6bee4e0de3fc23efdf2959dc39dcd8fe2 + src/Models/Operations/GetAnalyticsChannelsRangeResponse.php: + last_write_checksum: sha1:a0924e7169843179e0653d566a6edc13ee78e311 + src/Models/Operations/GetAnalyticsChannelsRequest.php: + last_write_checksum: sha1:d77d4723ec8fe4e70c1fae66ed2522baa0c542ee + src/Models/Operations/GetAnalyticsChannelsResponse.php: + last_write_checksum: sha1:256c6619274cc54195c6dc905aabddb0a6740383 + src/Models/Operations/GetAnalyticsChannelsResponseBody.php: + last_write_checksum: sha1:dbde76248233a5176190f387db3d2cd7cf1c0efe + src/Models/Operations/GetAnalyticsPoliciesPolicy.php: + last_write_checksum: sha1:562a4ffd14b2c10df3cefc47dfedefb38bd9219c + src/Models/Operations/GetAnalyticsPoliciesQueryParamRange.php: + last_write_checksum: sha1:58f551d5319a80821013f9efea1bde6687be4851 + src/Models/Operations/GetAnalyticsPoliciesRangeResponse.php: + last_write_checksum: sha1:8e1792cd6625f1614e753806a7921d10e08d4b69 + src/Models/Operations/GetAnalyticsPoliciesRequest.php: + last_write_checksum: sha1:c6626b537b62bd54b2153bcc1ad5cac3d32a2cf2 + src/Models/Operations/GetAnalyticsPoliciesResponse.php: + last_write_checksum: sha1:705404cc146c07e21bef9401379380236045249b + src/Models/Operations/GetAnalyticsPoliciesResponseBody.php: + last_write_checksum: sha1:88564a94e8239597f359d149a7ebfc21e92b950e + src/Models/Operations/GetAnalyticsSummaryQueryParamRange.php: + last_write_checksum: sha1:c31fe125cf7464b38b3c7cd1c58484cc07564ee5 + src/Models/Operations/GetAnalyticsSummaryRangeResponse.php: + last_write_checksum: sha1:e4d67687d650666527618c1355ca0d5d19dbe9cf + src/Models/Operations/GetAnalyticsSummaryRequest.php: + last_write_checksum: sha1:346468bfd8abe81385024615846ccd5198b349a4 + src/Models/Operations/GetAnalyticsSummaryResponse.php: + last_write_checksum: sha1:f6e192e119c974843f848f25ce43478fbd7de839 + src/Models/Operations/GetAnalyticsSummaryResponseBody.php: + last_write_checksum: sha1:07052bf2ca03cf051cdaa3c53255f543c22068ce + src/Models/Operations/GetAnalyticsVolumesQueryParamRange.php: + last_write_checksum: sha1:22bbdcdd0c45ca13bbf62f95377e1b695919bdaf + src/Models/Operations/GetAnalyticsVolumesRangeResponse.php: + last_write_checksum: sha1:8ec2dd1369c7a07ea2482c37e1141cbfb08e8d8c + src/Models/Operations/GetAnalyticsVolumesRequest.php: + last_write_checksum: sha1:6f85aceaad474d29bd1e22343cc60ac2cc535058 + src/Models/Operations/GetAnalyticsVolumesResponse.php: + last_write_checksum: sha1:bfda68fc1d31f232acf2da4155a94f08372a098b + src/Models/Operations/GetAnalyticsVolumesResponseBody.php: + last_write_checksum: sha1:ae9e71812fa7756de03c73bd474f7e7ddb395eab src/Models/Operations/GetAuthorRequest.php: - last_write_checksum: sha1:78420dbc05a9af8bcc46bf68cdbc9518416db798 + last_write_checksum: sha1:38a3bb0d876cc0f937e63200dbad571db6768a1d src/Models/Operations/GetAuthorResponse.php: last_write_checksum: sha1:e5c6517e769fc7b0c5d8139327b1d12926dff8da src/Models/Operations/GetChannelRequest.php: @@ -1101,48 +1343,42 @@ trackedFiles: last_write_checksum: sha1:8e4f46e08da93523917dc6a6ee7a0ddb178240d3 src/Models/Operations/GetProjectResponse.php: last_write_checksum: sha1:3baf996a7a38d1d566fa10d64b4a1ce93b879c8a - src/Models/Operations/GetQueueContentType.php: - last_write_checksum: sha1:f192ff57012150a07cbed93a9ab5f18855dde80f - src/Models/Operations/GetQueueRecommendationAction.php: - last_write_checksum: sha1:0f5a10569d177612578212a0b9d97140a1296b7c src/Models/Operations/GetQueueRequest.php: - last_write_checksum: sha1:79d0e4f68038d18e84bb37b011bc933111b9af7d + last_write_checksum: sha1:0619f1b390e98203db16575b90249a7af780d864 src/Models/Operations/GetQueueResponse.php: last_write_checksum: sha1:fd66044c894e522ac92cab79793b2f41169ec298 src/Models/Operations/GetQueueResponseBody.php: - last_write_checksum: sha1:2ca5dca83fd39bbafefca851d093a577e8bc12ac + last_write_checksum: sha1:4a76c5dcf8739c7a60bbc039a1d077631ed6e4ad src/Models/Operations/GetQueueStatsRequest.php: - last_write_checksum: sha1:f3136afe2d481db1d0909063939d87234e4c42ff + last_write_checksum: sha1:5a58cc748041a1819d88231f62a9e71796c43032 src/Models/Operations/GetQueueStatsResponse.php: last_write_checksum: sha1:dde9ab723d155e5e55f60e1c498d32c47181533d src/Models/Operations/GetQueueStatsResponseBody.php: - last_write_checksum: sha1:c958ba0c42e149693cf972bf11ef13e32b809759 - src/Models/Operations/GetQueueType.php: - last_write_checksum: sha1:65c31302210c53cc401c75d82e2ebfab75372565 + last_write_checksum: sha1:5fb58e703f93ad4da261f38fa486ead6a6b06d2c src/Models/Operations/GetWebhookEventType.php: last_write_checksum: sha1:a687a88ca242e7d02bd37291ac2d182f693b9f64 src/Models/Operations/GetWebhookPayloadVersion.php: last_write_checksum: sha1:5ac2d564aa48f415a0fc29c7c89f281fee832f1a src/Models/Operations/GetWebhookRequest.php: - last_write_checksum: sha1:920ff90f7b649c0759c70941e37d93471afb1c0f + last_write_checksum: sha1:8e98d28ae4954b4f054150ff190af691779edf37 src/Models/Operations/GetWebhookResponse.php: last_write_checksum: sha1:56e9ecda90f2f48ce9a0ab26ab517b7b18a967fb src/Models/Operations/GetWebhookResponseBody.php: last_write_checksum: sha1:4e0885fa5571b72a7e35b4f9374691e6e4c5f1c7 src/Models/Operations/GetWebhookSecretRequest.php: - last_write_checksum: sha1:0b855ed6ac67aa6bdeb7973a7e7f2a62e42420d4 + last_write_checksum: sha1:5bc7af9683292c3f4951116060cda7d4e8a38314 src/Models/Operations/GetWebhookSecretResponse.php: last_write_checksum: sha1:da002d0f56812b48bd32105501c9f1b80afea107 src/Models/Operations/GetWebhookSecretResponseBody.php: last_write_checksum: sha1:92a28e74d3e264c0c97f97a7a079a50ee6358bcb src/Models/Operations/GetWordlistEmbeddingStatusRequest.php: - last_write_checksum: sha1:8c29ac516030176fe3be275b22669c2718651d6f + last_write_checksum: sha1:a316d12c375b8667043cdff8ebf77721b769bbe4 src/Models/Operations/GetWordlistEmbeddingStatusResponse.php: last_write_checksum: sha1:efd22df7e9ea92f09462d244e886d64c5005d00e src/Models/Operations/GetWordlistEmbeddingStatusResponseBody.php: last_write_checksum: sha1:63599f1504d30689717e8c73fdd62aaaa579e71f src/Models/Operations/GetWordlistRequest.php: - last_write_checksum: sha1:9478177efdd9c94bac6559e1071608c236ae9eb1 + last_write_checksum: sha1:710172bd4f318865a5a112368c90fc07d04c2012 src/Models/Operations/GetWordlistResponse.php: last_write_checksum: sha1:109838af6005b73b1d1c68ef254a9b5b18afaefd src/Models/Operations/GetWordlistResponseBody.php: @@ -1171,8 +1407,8 @@ trackedFiles: last_write_checksum: sha1:ef9497c5c77eb5e8fe310051376e13fbc44b1d71 src/Models/Operations/ImageResponse.php: last_write_checksum: sha1:decbce91ed291f85b9088f73352e79165f0eb3e6 - src/Models/Operations/IsFlagged.php: - last_write_checksum: sha1:116d9790b61ef0202446448b1443e7f21831d591 + src/Models/Operations/Label.php: + last_write_checksum: sha1:922b3bb887bd910b85ed623842f6fbf872b8e019 src/Models/Operations/LanguageInsight.php: last_write_checksum: sha1:9f255d2a530d6627eebe3ce7277c1cb74ae25474 src/Models/Operations/ListActionsData.php: @@ -1184,7 +1420,7 @@ trackedFiles: src/Models/Operations/ListActionsQueueBehaviour.php: last_write_checksum: sha1:0c8e33b429fa9ca12b03cdac8223a6b201027b2f src/Models/Operations/ListActionsRequest.php: - last_write_checksum: sha1:39b6e1efd8a113b3cfba1132e5bb29f793b309cd + last_write_checksum: sha1:c0ec4e9e7a301b1c3e9c8afdac11059af5ad5f0a src/Models/Operations/ListActionsResponse.php: last_write_checksum: sha1:57db3b2d174ad07cdb1b5f5556d6e9dad9bd025c src/Models/Operations/ListActionsResponseBody.php: @@ -1192,13 +1428,11 @@ trackedFiles: src/Models/Operations/ListActionsType.php: last_write_checksum: sha1:0c8962ffc3ef8451b1d12eaba04a61f24f51765f src/Models/Operations/ListAuthorsRequest.php: - last_write_checksum: sha1:f7bc29d33c9ddefbba5a1ad8e129a7ccd4168ec3 + last_write_checksum: sha1:f0380e30cc1149e3e0e1212c49ce58bb56aeccbc src/Models/Operations/ListAuthorsResponse.php: last_write_checksum: sha1:310c8d4e136956f38222de060dc3460ede0c185e src/Models/Operations/ListAuthorsResponseBody.php: last_write_checksum: sha1:5c592e0ee20b132e8b103e7bfa5516eb068c6b1b - src/Models/Operations/ListAuthorsSortDirection.php: - last_write_checksum: sha1:7b0d0d25c60775b8c7bfdc9e22ef7fc8a4d1392d src/Models/Operations/ListChannelsRequest.php: last_write_checksum: sha1:fe53f4a34e821c51cf416b567ef45ca14bc30079 src/Models/Operations/ListChannelsResponse.php: @@ -1211,22 +1445,18 @@ trackedFiles: last_write_checksum: sha1:700caf1797027d561b2f7b2f7a6151ef8f1fe942 src/Models/Operations/ListProjectsResponseBody.php: last_write_checksum: sha1:ba53e664854647fe1af07ddba6d1bd632d453893 - src/Models/Operations/ListQueueItemsAction.php: - last_write_checksum: sha1:252ff47c2c1f9b2946d2c2c61bfcfb5b61551671 - src/Models/Operations/ListQueueItemsData.php: - last_write_checksum: sha1:0fd3ac043807fea4336154e55ef5312e14512de5 - src/Models/Operations/ListQueueItemsLabel.php: - last_write_checksum: sha1:0d5d3dcd6b113f05a8cbe0ea2a4a64a02c503edc src/Models/Operations/ListQueueItemsRequest.php: - last_write_checksum: sha1:a40c073e21c3dc66a2f3f9168c3371abfe8e73f2 + last_write_checksum: sha1:15eef9223d3fe02dea086686c15f3bba3e53dd59 src/Models/Operations/ListQueueItemsResponse.php: last_write_checksum: sha1:3277eea35702e991534b8f51d1333fefde8e5779 src/Models/Operations/ListQueueItemsResponseBody.php: - last_write_checksum: sha1:9cb231ce4e1db42cabdef294249fd2843b832740 - src/Models/Operations/ListQueueItemsSortDirection.php: - last_write_checksum: sha1:1191580718876d0d4f07a860b6f99f8296967994 - src/Models/Operations/ListQueueItemsStatus.php: - last_write_checksum: sha1:95753cb269e0c02e1c803e3744d7effe364a658d + last_write_checksum: sha1:8d1738b453255555d7dba4ccc4a539fd3afcd5bf + src/Models/Operations/ListQueuesRequest.php: + last_write_checksum: sha1:abbbbe78aab84ae03a8365775f5a427814ba8ce3 + src/Models/Operations/ListQueuesResponse.php: + last_write_checksum: sha1:e8a7e68d5c9c5c7aecd3699d57f2945f3c67097c + src/Models/Operations/ListQueuesResponseBody.php: + last_write_checksum: sha1:445f3dafe1f3e84eac017caad557785136865492 src/Models/Operations/ListWebhooksData.php: last_write_checksum: sha1:d2c0eb94ea30c94961fa342289ef268498bee7e0 src/Models/Operations/ListWebhooksEventType.php: @@ -1234,7 +1464,7 @@ trackedFiles: src/Models/Operations/ListWebhooksPayloadVersion.php: last_write_checksum: sha1:fbeca33e8478ebfc89591df3e1b7b7fdf8527a9e src/Models/Operations/ListWebhooksRequest.php: - last_write_checksum: sha1:e193e65654c9ede48dc7424b54fc896f45a0b490 + last_write_checksum: sha1:f7ae2e9de2a8bec5467cd117934db6f04889452f src/Models/Operations/ListWebhooksResponse.php: last_write_checksum: sha1:f9fb807c707dd6565fcbc4d589c7fc88c70f94bd src/Models/Operations/ListWebhooksResponseBody.php: @@ -1242,7 +1472,7 @@ trackedFiles: src/Models/Operations/ListWordlistsData.php: last_write_checksum: sha1:69c58130e30f976fb171c36fc457df97cc8e4bd5 src/Models/Operations/ListWordlistsRequest.php: - last_write_checksum: sha1:95efd159c7b0193bf434148f6ccbfbec1f279540 + last_write_checksum: sha1:bad9823568744bc4a3fff25854dd1d1709b72850 src/Models/Operations/ListWordlistsResponse.php: last_write_checksum: sha1:7cdcc8c5efdc90d59c57b26601660cfbed556dea src/Models/Operations/ListWordlistsResponseBody.php: @@ -1253,16 +1483,12 @@ trackedFiles: last_write_checksum: sha1:6ea67267df6aee773b7db1ec8f928ceec39099f0 src/Models/Operations/MatchedRule.php: last_write_checksum: sha1:acaf6d97d48e7b7bcb0c11a563d3141f49228db9 - src/Models/Operations/MediaType.php: - last_write_checksum: sha1:f53dea6ffcb3e10b3fee0ebbf20d67d0dbb2a5a2 src/Models/Operations/Meta.php: last_write_checksum: sha1:58ecf28153646d9fefe65503f236ae07a58597f8 src/Models/Operations/MetaStatus.php: last_write_checksum: sha1:c93ace3576ade67f1dc40c7f1d596bc00fe48232 src/Models/Operations/MetaType.php: last_write_checksum: sha1:b859f8207af7f8826328bf98656bd5a1dd760fb0 - src/Models/Operations/MetadataFilter.php: - last_write_checksum: sha1:6daf42c32238c5d5831dae5ed91e2dc437ce1def src/Models/Operations/Method.php: last_write_checksum: sha1:f439b06a61fcda19dfefbad2b3c2b24d338940e5 src/Models/Operations/ObjectT.php: @@ -1275,36 +1501,44 @@ trackedFiles: last_write_checksum: sha1:faf646f1632dec7f26a732c2d7ba7636d3ce67f7 src/Models/Operations/Political.php: last_write_checksum: sha1:c98a4ec1651731a391e32ef0ab1f55290bcdca27 + src/Models/Operations/PreviousPeriod.php: + last_write_checksum: sha1:7697005465b30c50f67caf65f5e7031cdf1bf31b src/Models/Operations/Profanity.php: last_write_checksum: sha1:d2e0d680a270dcb0f8450e4048a6535d2a80fb50 src/Models/Operations/Promotion.php: last_write_checksum: sha1:f77e3d2f92c8b1555c21f0ef92891f064afb32f4 - src/Models/Operations/Queue.php: - last_write_checksum: sha1:093ed12a0c18ff0046a47f1d60ac2e56404eaa6a src/Models/Operations/ReasonCodeEnum.php: last_write_checksum: sha1:6bf4ea761289ac785e0255c7f3804d9565d3cd96 src/Models/Operations/Recommendation.php: - last_write_checksum: sha1:cbb4a1aa8b649021dfeb1a3ff4b245bd7ba15509 + last_write_checksum: sha1:f4c2a466359c4367ee00eee1a64777520561f4df src/Models/Operations/Religion.php: last_write_checksum: sha1:77cf485d673e50a293b5261c256cb572133adac7 src/Models/Operations/RemoveWordlistWordsRequest.php: - last_write_checksum: sha1:e3698c6e02689d45316b3d1f7694afaed250f96c + last_write_checksum: sha1:80e3b7de8a2427a88bc117deb5cf950b333851c4 src/Models/Operations/RemoveWordlistWordsResponse.php: last_write_checksum: sha1:0c8f1f021c5e4d53e010198da9ede996b7b232b9 src/Models/Operations/RemoveWordlistWordsResponseBody.php: last_write_checksum: sha1:616012ca61922bfb310e29c791df90767b646c44 src/Models/Operations/ResolveQueueItemRequest.php: - last_write_checksum: sha1:c9639d1518000013bf1e10033b76a90b0bc60337 - src/Models/Operations/ResolveQueueItemRequestBody.php: - last_write_checksum: sha1:eca8b3874e279a09dc505a2804be0e0e41ece1fc + last_write_checksum: sha1:ecf2f34b3e9196d7bf7b0c15577753b04a4ac440 src/Models/Operations/ResolveQueueItemResponse.php: last_write_checksum: sha1:633e4f018e58afd3489001095a8e53e6d4a007cb src/Models/Operations/ResolveQueueItemResponseBody.php: - last_write_checksum: sha1:ace4c07a8d15b66f9b763f2ffcaa5c93aa364fad + last_write_checksum: sha1:3fd82c93a862d56daa5069a6d7ccefc8bd6a507a + src/Models/Operations/ResolveQueueItemsRequest.php: + last_write_checksum: sha1:3ccff66584e3587d7bdce0adf4593e3d087dbe6f + src/Models/Operations/ResolveQueueItemsRequestBody.php: + last_write_checksum: sha1:373db95f4a4eab8fd92b2b6be569df1a31e2feb6 + src/Models/Operations/ResolveQueueItemsResponse.php: + last_write_checksum: sha1:5ad92db0f28554426f7fe10e21f96d8935feebc7 + src/Models/Operations/ResolveQueueItemsResponseBody.php: + last_write_checksum: sha1:c36317d7e6b697bf1913c672c8b0bb82fc240ced src/Models/Operations/RespectInsight.php: last_write_checksum: sha1:c762707b020bd49e5342940627e1babf9142fc64 src/Models/Operations/ReviewStats.php: - last_write_checksum: sha1:c5274a36adfcd6e692bf07a11cdb0e76bcd476f6 + last_write_checksum: sha1:8800c846cc36f5084e4cfb2084f5189d9dbd5a91 + src/Models/Operations/Rule.php: + last_write_checksum: sha1:2ea03bccc9e095c4c8da2b9a94269c448d5c2c7a src/Models/Operations/Scores.php: last_write_checksum: sha1:7d134a524f316f12841ac3657207ca12d680ed83 src/Models/Operations/SelfHarm.php: @@ -1323,24 +1557,26 @@ trackedFiles: last_write_checksum: sha1:7e04252d0fbc5ab89e01f6d3176420ba0f5fd76f src/Models/Operations/SignalsResponse.php: last_write_checksum: sha1:def75e4b92c4ea9f8e01724d9ff1847e261b976e + src/Models/Operations/Sort.php: + last_write_checksum: sha1:8ae288dc521988dcbfebae3ddc0e53959bdc197a src/Models/Operations/SortBy.php: - last_write_checksum: sha1:dc1c0b3a159bc97742dddcd11237c7e4db376323 - src/Models/Operations/SortField.php: - last_write_checksum: sha1:4829ae93bb79bbe05d5afb328c84eff740c38006 + last_write_checksum: sha1:5958d560878c915648566a433afc382a2c010d11 + src/Models/Operations/SortDirection.php: + last_write_checksum: sha1:a29d0c9fe01d87a9576152e62d438fd06b0b262c + src/Models/Operations/Source.php: + last_write_checksum: sha1:e40f93f1fc0d9f70332565025728b45a9a6bf37b src/Models/Operations/Spam.php: last_write_checksum: sha1:5463f9d553e47cd3cf501022f832853f73103fee - src/Models/Operations/SubmitContentLabel.php: - last_write_checksum: sha1:876d17769cf3d2caf71a0a631bd4291b7af35813 - src/Models/Operations/SubmitContentRecommendationAction.php: - last_write_checksum: sha1:828f11273d8233c82dbc41be5c2c12b907aad56c + src/Models/Operations/SubmitContentAuthor.php: + last_write_checksum: sha1:be7aaf6f8ab2c578be4ef48b888b960b50bb6910 src/Models/Operations/SubmitContentRequest.php: - last_write_checksum: sha1:d320a1bcc1f66b1894134de9ce2cb41e003cc825 + last_write_checksum: sha1:0c4dc9142e0ef4d6e38efc6ff080c789f292f4fe src/Models/Operations/SubmitContentRequestBody.php: - last_write_checksum: sha1:449c091e46d27cd4493654ed9c32f97d4068921f + last_write_checksum: sha1:d55aeeeaf7629364ca7d569e39b0b2091a6bf621 src/Models/Operations/SubmitContentResponse.php: last_write_checksum: sha1:69f1b46bd44843fddb5c9ac81e89607ad6ca0019 src/Models/Operations/SubmitContentResponseBody.php: - last_write_checksum: sha1:4b9a24ba2478d35f6574057911206ff6686f0f60 + last_write_checksum: sha1:1b1de76a0c0045485bbfe5060550b5b5867ced2e src/Models/Operations/TextRequest.php: last_write_checksum: sha1:de9a86c059fc52f9be85775b7b0ae02f3f766f2c src/Models/Operations/TextResponse.php: @@ -1349,18 +1585,18 @@ trackedFiles: last_write_checksum: sha1:efb18420ee2927e7369d4aa54356e1715978db02 src/Models/Operations/Tobacco.php: last_write_checksum: sha1:f3e92463a1ad04b8e5c85ec0673225ffd0231857 - src/Models/Operations/TopAction.php: - last_write_checksum: sha1:7c745a27c874bee3859a7e413c97fd417dfd33cb src/Models/Operations/TopReviewer.php: - last_write_checksum: sha1:903c4f998cfe636fc84d7f7b2819c59feba2ffb2 + last_write_checksum: sha1:5311d1e915116350d5ed0e49f93c0150da44d9ea src/Models/Operations/Topic.php: last_write_checksum: sha1:725b1071a1be0e5b9b43dd8f5958705057b65b07 + src/Models/Operations/Totals.php: + last_write_checksum: sha1:8e98c995219a7c802155309f8eaa2164c54988c5 src/Models/Operations/Toxicity.php: last_write_checksum: sha1:da7e4a0800153b256759dbc03d2f0fb3c763bd8f src/Models/Operations/TranscriptionQuality.php: last_write_checksum: sha1:48ea134068f1b2ecf10c9817f799a2907f7535b4 src/Models/Operations/Trends.php: - last_write_checksum: sha1:d5286238cb76588d850cc7153289a5d6c713d3e4 + last_write_checksum: sha1:823db5ca3171354a2f1db6946b2f48d005c16de8 src/Models/Operations/TrustLevel.php: last_write_checksum: sha1:043f941971dff3a81f1bca92adc4f4304fa2fdf8 src/Models/Operations/URLMasking.php: @@ -1370,13 +1606,13 @@ trackedFiles: src/Models/Operations/UnicodeSpoofing.php: last_write_checksum: sha1:280971a1558295ec10314a1f8ea945083b2b10e2 src/Models/Operations/UnresolveQueueItemRequest.php: - last_write_checksum: sha1:6959683937a2a177ce5093803384cc31bcf1c9dd - src/Models/Operations/UnresolveQueueItemRequestBody.php: - last_write_checksum: sha1:850deadebf4b9e3044dbbdd56992525937f60cc1 + last_write_checksum: sha1:c4eec26b08994710d880c2b559cb6e954fb688e2 src/Models/Operations/UnresolveQueueItemResponse.php: last_write_checksum: sha1:2f5ec7c6a563b965063f5a5708b8edd7a1934b52 src/Models/Operations/UnresolveQueueItemResponseBody.php: - last_write_checksum: sha1:4d44a1b6a7e38ea5eaadec9eff0f4aba28ee27b5 + last_write_checksum: sha1:9f132dd5dd8099da99539aa6b476e37bada0abc5 + src/Models/Operations/UnresolveQueueItemStatus.php: + last_write_checksum: sha1:6d9d68963fe9558f1032362f1f17986d6877a8f2 src/Models/Operations/UpdateActionPositionRequest.php: last_write_checksum: sha1:1d71584739b622c58be126452980422ac142c112 src/Models/Operations/UpdateActionPositionResponse.php: @@ -1390,7 +1626,7 @@ trackedFiles: src/Models/Operations/UpdateActionQueueBehaviourResponse.php: last_write_checksum: sha1:093e54a0e1695af1ebfafdd71d7000d9884d5b78 src/Models/Operations/UpdateActionRequest.php: - last_write_checksum: sha1:1ab53d92cd1bbf516098eb4083760241dfae064b + last_write_checksum: sha1:42e9442683b443b9970f5e98849debef9d3448c6 src/Models/Operations/UpdateActionRequestBody.php: last_write_checksum: sha1:9aa9023855c8c17e77ccfa516c9fb5eb3ad4dcad src/Models/Operations/UpdateActionResponse.php: @@ -1404,7 +1640,7 @@ trackedFiles: src/Models/Operations/UpdateAuthorMetadata.php: last_write_checksum: sha1:f530dd3597b8dd3773d105b2af7930ae87f2c892 src/Models/Operations/UpdateAuthorRequest.php: - last_write_checksum: sha1:d6efc3740cce71de26abb19925dc89e0574b1b9c + last_write_checksum: sha1:e0c9097accd6bb1ca9901bc030fa12fd2e0b1393 src/Models/Operations/UpdateAuthorRequestBody.php: last_write_checksum: sha1:90a85a572f6a627e4b2f1215cff2a16bcf17cd7f src/Models/Operations/UpdateAuthorResponse.php: @@ -1430,7 +1666,7 @@ trackedFiles: src/Models/Operations/UpdateWebhookPayloadVersion.php: last_write_checksum: sha1:ab86561e2cdf2076c60459152bf356b480b35b2e src/Models/Operations/UpdateWebhookRequest.php: - last_write_checksum: sha1:99b95fa8148a3257435b80b8c00a975e158ace6d + last_write_checksum: sha1:8417eece74e2c6b7c452eea6bfd5b067d68a0bc8 src/Models/Operations/UpdateWebhookRequestBody.php: last_write_checksum: sha1:36c01c23a9efd73d603a99720530cd426300bfe0 src/Models/Operations/UpdateWebhookResponse.php: @@ -1438,9 +1674,9 @@ trackedFiles: src/Models/Operations/UpdateWebhookResponseBody.php: last_write_checksum: sha1:007baee2512abe6a851b7db47f728889ece8c146 src/Models/Operations/UpdateWordlistRequest.php: - last_write_checksum: sha1:d0ada12c8093a8b11132f792007ab946cc80b72c + last_write_checksum: sha1:56b85ac0d16ba780a7213462c2f9ad688469c8ac src/Models/Operations/UpdateWordlistRequestBody.php: - last_write_checksum: sha1:4c87601c65a232654f2fdaa080aa5e6e19e773f7 + last_write_checksum: sha1:16665608c40b86d76649c5b219d5d26853758eae src/Models/Operations/UpdateWordlistResponse.php: last_write_checksum: sha1:99c99fa27ae44ecb656ddf7d1213e517bc36cec9 src/Models/Operations/UpdateWordlistResponseBody.php: @@ -1455,20 +1691,20 @@ trackedFiles: last_write_checksum: sha1:cfcf1bc4c3d7875dd7a31f777a74f9f70f9831b0 src/Models/Operations/Violence.php: last_write_checksum: sha1:5d64b4fea8852bf3be4c676b44263fdbc02a0ace + src/Models/Operations/Volume.php: + last_write_checksum: sha1:b6213a1598039219860ae8199dd7c2398f34c050 src/Models/Operations/Weapons.php: last_write_checksum: sha1:6f08c11a3765a35008407445842f40c1b602db24 - src/Models/Operations/WithinUnit.php: - last_write_checksum: sha1:2bcee79806e20da2d6ea91de1185cbef7b687a2c src/ModerationApi.php: - last_write_checksum: sha1:125a0b3d40a2adc7cb0392536b632611a2842a16 + last_write_checksum: sha1:66997e994eb7739c00d6025c2c1cfee7e32108c1 src/ModerationApiBuilder.php: last_write_checksum: sha1:16809f5bed82b4ad4c18f3322de18d04e32a372d src/Projects.php: - last_write_checksum: sha1:50ff2ba13fe33e6d62384ff9825977e6efd40a34 + last_write_checksum: sha1:4be77e8c953851703399bb93d829273c7e839333 src/Queue.php: - last_write_checksum: sha1:6e827e98b2489b7f06b1d5869e54f47e6ae2816c + last_write_checksum: sha1:be966a810109ae154cee3d97d78b3dec2c7512ef src/SDKConfiguration.php: - last_write_checksum: sha1:63ff169e43e51e25c2eaa43940df61e4c0fdcd25 + last_write_checksum: sha1:649e776e2649b016ac683bf1e01e36d49e23ab4f src/Utils/BigDecimalHandler.php: last_write_checksum: sha1:2d36b5ae690b042acfcdfe7e7277d44c5055416f src/Utils/BigIntHandler.php: @@ -1544,7 +1780,7 @@ trackedFiles: src/Webhooks.php: last_write_checksum: sha1:bcaee6b9579d83bca24b0082b34d43af8ae3ec48 src/Wordlist.php: - last_write_checksum: sha1:db67c57d48233ad9948cdf8d4a034c3bb38f4390 + last_write_checksum: sha1:6da5968931e849b59a3edd523ca051f261a4b424 src/Words.php: last_write_checksum: sha1:4637eb2d0b501a92de44a21f70e7326408ff892b examples: @@ -1656,7 +1892,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": @@ -1678,7 +1914,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": @@ -1702,7 +1938,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": @@ -1746,7 +1982,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": @@ -2297,4 +2533,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 6ca615d..72c8485 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false php: - version: 1.1.1 + version: 1.2.0 additionalDependencies: autoload: {} autoload-dev: {} diff --git a/.speakeasy/openapi.json b/.speakeasy/openapi.json index 31ff464..cabb255 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 ccf9000..1c9a3b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,141 @@ # Changelog +## 1.2.0 (2026-10-26) + +Full Changelog: [v1.1.1...v1.2.0](https://github.com/moderation-api/sdk-php/compare/v1.1.1...v1.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 + ## 1.1.1 (2026-10-22) Full Changelog: [v1.1.0...v1.1.1](https://github.com/moderation-api/sdk-php/compare/v1.1.0...v1.1.1) diff --git a/README.md b/README.md index 9779bf7..5829e40 100644 --- a/README.md +++ b/README.md @@ -228,17 +228,14 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$request = new Operations\ListAuthorsRequest(); -$responses = $sdk->authors->list( - request: $request -); +$response = $sdk->analytics->summary( + range: Operations\GetAnalyticsSummaryQueryParamRange::Thirtyd +); -foreach ($responses as $response) { - if ($response->statusCode === 200) { - // handle response - } +if ($response->object !== null) { + // handle response } ``` @@ -248,9 +245,9 @@ foreach ($responses as $response) { 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: ```php use ModerationApi\ModerationApi; @@ -295,6 +292,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 @@ -316,6 +322,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 @@ -325,15 +335,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 * [getStats](docs/sdks/queue/README.md#getstats) - 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 +* [resolveMany](docs/sdks/items/README.md#resolvemany) - Resolve queue items * [unresolve](docs/sdks/items/README.md#unresolve) - Unresolve a queue item ### [Webhooks](docs/sdks/webhooks/README.md) @@ -351,6 +367,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 * [getEmbeddingStatus](docs/sdks/wordlist/README.md#getembeddingstatus) - Get embedding status @@ -413,7 +430,7 @@ By default an API error will raise a `Errors\APIException` exception, which has | `$rawResponse` | *?\Psr\Http\Message\ResponseInterface* | 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 | | ---------------------------- | ----------- | ---------------- | @@ -443,16 +460,12 @@ $sdk = ModerationApi\ModerationApi::builder() ->build(); try { - $request = new Operations\ListAuthorsRequest(); - - $responses = $sdk->authors->list( - request: $request + $response = $sdk->analytics->summary( + range: Operations\GetAnalyticsSummaryQueryParamRange::Thirtyd ); - foreach ($responses as $response) { - if ($response->statusCode === 200) { - // handle response - } + if ($response->object !== null) { + // handle response } } catch (Errors\BadRequestErrorThrowable $e) { // handle $e->$container data @@ -500,17 +513,14 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$request = new Operations\ListAuthorsRequest(); -$responses = $sdk->authors->list( - request: $request -); +$response = $sdk->analytics->summary( + range: Operations\GetAnalyticsSummaryQueryParamRange::Thirtyd +); -foreach ($responses as $response) { - if ($response->statusCode === 200) { - // handle response - } +if ($response->object !== null) { + // handle response } ``` diff --git a/docs/Models/Components/BadRequestErrorCode.md b/docs/Models/Components/BadRequestErrorCode.md index f1d83c8..80ce359 100644 --- a/docs/Models/Components/BadRequestErrorCode.md +++ b/docs/Models/Components/BadRequestErrorCode.md @@ -3,14 +3,16 @@ 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`. ## Values -| Name | Value | -| ------------------- | ------------------- | -| `InvalidRequest` | invalid_request | -| `ProjectIdRequired` | project_id_required | -| `ValidationFailed` | validation_failed | \ No newline at end of file +| Name | Value | +| ---------------------- | ---------------------- | +| `InvalidRequest` | invalid_request | +| `ProjectIdRequired` | project_id_required | +| `ProjectNameAmbiguous` | project_name_ambiguous | +| `ValidationFailed` | 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 0000000..5abcf5c --- /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` | *?bool* | :heavy_minus_sign: | True if the label was applied manually by a moderator | +| `flagged` | *?bool* | :heavy_minus_sign: | Whether this label crossed its flagging threshold | +| `shadowFlagged` | *?bool* | :heavy_minus_sign: | Whether this label crossed its threshold under a shadowed policy — reported for visibility, never counted toward a flagging decision | +| `matches` | array<[Components\QueueItemMatch](../../Models/Components/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 238f1b3..973538a 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. @@ -14,13 +15,14 @@ Exactly what went wrong. Stable; safe to branch on. New codes may be added. ## Values -| Name | Value | -| ------------------ | ------------------ | -| `ResourceNotFound` | resource_not_found | -| `ActionNotFound` | action_not_found | -| `AuthorNotFound` | author_not_found | -| `QueueNotFound` | queue_not_found | -| `WordlistNotFound` | wordlist_not_found | -| `WebhookNotFound` | webhook_not_found | -| `ProjectNotFound` | project_not_found | -| `ChannelNotFound` | channel_not_found | \ No newline at end of file +| Name | Value | +| -------------------- | -------------------- | +| `ResourceNotFound` | resource_not_found | +| `ActionNotFound` | action_not_found | +| `AuthorNotFound` | author_not_found | +| `QueueNotFound` | queue_not_found | +| `QueueItemNotFound` | queue_item_not_found | +| `WordlistNotFound` | wordlist_not_found | +| `WebhookNotFound` | webhook_not_found | +| `ProjectNotFound` | project_not_found | +| `ChannelNotFound` | 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 0000000..65790ca --- /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. | +| `projectId` | *string* | :heavy_check_mark: | The ID of the project the key belongs to. | +| `createdAt` | *string* | :heavy_check_mark: | When the key was created. | +| `secretKey` | *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 e496601..34cc666 100644 --- a/docs/Models/Components/PublicAuthor.md +++ b/docs/Models/Components/PublicAuthor.md @@ -15,7 +15,7 @@ | `firstSeen` | *float* | :heavy_check_mark: | Timestamp when author first appeared | | `lastSeen` | *float* | :heavy_check_mark: | Timestamp of last activity | | `lastIncident` | *?float* | :heavy_minus_sign: | Timestamp of last incident | -| `status` | [Components\Status](../../Models/Components/Status.md) | :heavy_check_mark: | Current author status | +| `status` | [Components\PublicAuthorStatus](../../Models/Components/PublicAuthorStatus.md) | :heavy_check_mark: | Current author status | | `trustLevel` | [Components\TrustLevel](../../Models/Components/TrustLevel.md) | :heavy_check_mark: | N/A | | `block` | [Components\Block](../../Models/Components/Block.md) | :heavy_check_mark: | Block or suspension details, if applicable. Null if the author is enabled. | | `riskEvaluation` | [Components\RiskEvaluation](../../Models/Components/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 89% rename from docs/Models/Components/Status.md rename to docs/Models/Components/PublicAuthorStatus.md index 650b4d9..fb1c97f 100644 --- a/docs/Models/Components/Status.md +++ b/docs/Models/Components/PublicAuthorStatus.md @@ -1,4 +1,4 @@ -# Status +# PublicAuthorStatus Current author status diff --git a/docs/Models/Components/Queue.md b/docs/Models/Components/Queue.md new file mode 100644 index 0000000..987fc90 --- /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` | *string* | :heavy_check_mark: | The queue description. | +| `isDefault` | *bool* | :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 0000000..f5c037f --- /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. | +| `contentId` | *string* | :heavy_check_mark: | Your content ID, as you sent it to `POST /moderate`. | +| `content` | [Components\QueueItemText\|Components\QueueItemImage\|Components\QueueItemVideo\|Components\QueueItemAudio\|Components\QueueItemObject](../../Models/Components/QueueItemContent.md) | :heavy_check_mark: | The submitted content. | +| `labels` | array<[Components\Label](../../Models/Components/Label.md)> | :heavy_check_mark: | The moderation labels of the content. | +| `flagged` | *bool* | :heavy_check_mark: | Whether moderation flagged the content. | +| `severity` | *float* | :heavy_check_mark: | Severity score from 0 to 1, if available. | +| `status` | [Components\QueueItemStatus](../../Models/Components/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` | *string* | :heavy_check_mark: | Detected ISO language code. | +| `conversationId` | *string* | :heavy_check_mark: | Conversation ID, if any. | +| `authorId` | *string* | :heavy_check_mark: | Your author ID, if any. | +| `contentType` | *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 0000000..9703275 --- /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 f9df729..a4ac5ee 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 0000000..cc4562e --- /dev/null +++ b/docs/Models/Components/QueueItemContent.md @@ -0,0 +1,50 @@ +# QueueItemContent + + +## Supported Types + +### `Components\QueueItemText` + +```php +/** +* @var \ModerationApi\Models\Components\QueueItemText +*/ +Components\QueueItemText $value = /* values here */ +``` + +### `Components\QueueItemImage` + +```php +/** +* @var \ModerationApi\Models\Components\QueueItemImage +*/ +Components\QueueItemImage $value = /* values here */ +``` + +### `Components\QueueItemVideo` + +```php +/** +* @var \ModerationApi\Models\Components\QueueItemVideo +*/ +Components\QueueItemVideo $value = /* values here */ +``` + +### `Components\QueueItemAudio` + +```php +/** +* @var \ModerationApi\Models\Components\QueueItemAudio +*/ +Components\QueueItemAudio $value = /* values here */ +``` + +### `Components\QueueItemObject` + +```php +/** +* @var \ModerationApi\Models\Components\QueueItemObject +*/ +Components\QueueItemObject $value = /* values here */ +``` + diff --git a/docs/Models/Components/QueueItemContentLeaf.md b/docs/Models/Components/QueueItemContentLeaf.md new file mode 100644 index 0000000..810a684 --- /dev/null +++ b/docs/Models/Components/QueueItemContentLeaf.md @@ -0,0 +1,41 @@ +# QueueItemContentLeaf + + +## Supported Types + +### `Components\QueueItemContentLeafText` + +```php +/** +* @var \ModerationApi\Models\Components\QueueItemContentLeafText +*/ +Components\QueueItemContentLeafText $value = /* values here */ +``` + +### `Components\QueueItemContentLeafImage` + +```php +/** +* @var \ModerationApi\Models\Components\QueueItemContentLeafImage +*/ +Components\QueueItemContentLeafImage $value = /* values here */ +``` + +### `Components\QueueItemContentLeafVideo` + +```php +/** +* @var \ModerationApi\Models\Components\QueueItemContentLeafVideo +*/ +Components\QueueItemContentLeafVideo $value = /* values here */ +``` + +### `Components\QueueItemContentLeafAudio` + +```php +/** +* @var \ModerationApi\Models\Components\QueueItemContentLeafAudio +*/ +Components\QueueItemContentLeafAudio $value = /* values here */ +``` + diff --git a/docs/Models/Components/QueueItemContentLeafAudio.md b/docs/Models/Components/QueueItemContentLeafAudio.md new file mode 100644 index 0000000..c15c1a9 --- /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 0000000..4ec5e25 --- /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` | *?string* | :heavy_minus_sign: | A public URL of the image content. Either url or data must be provided. | +| `data` | *?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 0000000..9453293 --- /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 0000000..62dd821 --- /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 0000000..da6ee4f --- /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` | *?string* | :heavy_minus_sign: | A public URL of the image content. Either url or data must be provided. | +| `data` | *?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 0000000..f55b32c --- /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` | array<*float*> | :heavy_check_mark: | [start, end] character offsets in the source text | +| `mask` | *?string* | :heavy_minus_sign: | N/A | +| `reasons` | array<*string*> | :heavy_minus_sign: | N/A | +| `signals` | [?Components\QueueItemSignals](../../Models/Components/QueueItemSignals.md) | :heavy_minus_sign: | N/A | +| `entityType` | *?string* | :heavy_minus_sign: | N/A | +| `scripts` | array<*string*> | :heavy_minus_sign: | N/A | +| `skeleton` | *?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 0000000..ff0b00d --- /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` | array | :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 0000000..5da4e08 --- /dev/null +++ b/docs/Models/Components/QueueItemSignals.md @@ -0,0 +1,16 @@ +# QueueItemSignals + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `brandImpersonation` | [Components\QueueItemBrandImpersonation](../../Models/Components/QueueItemBrandImpersonation.md) | :heavy_check_mark: | N/A | +| `hasSuspiciousCharacters` | *bool* | :heavy_check_mark: | N/A | +| `isLinkShortener` | *bool* | :heavy_check_mark: | N/A | +| `domainAgeDays` | *float* | :heavy_check_mark: | N/A | +| `hasEmailSetup` | *bool* | :heavy_check_mark: | N/A | +| `redirectCount` | *float* | :heavy_check_mark: | N/A | +| `finalUrl` | *string* | :heavy_check_mark: | N/A | +| `botProtection` | *bool* | :heavy_check_mark: | N/A | +| `isReported` | *bool* | :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 64% rename from docs/Models/Operations/ListQueueItemsStatus.md rename to docs/Models/Components/QueueItemStatus.md index 31be4c7..6ec46fa 100644 --- a/docs/Models/Operations/ListQueueItemsStatus.md +++ b/docs/Models/Components/QueueItemStatus.md @@ -1,6 +1,6 @@ -# ListQueueItemsStatus +# QueueItemStatus -Status of the item +`pending` waits for review. `resolved` is reviewed. ## Values diff --git a/docs/Models/Components/QueueItemText.md b/docs/Models/Components/QueueItemText.md new file mode 100644 index 0000000..4e6074f --- /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 0000000..6777ef3 --- /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 0000000..127634b --- /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` | *string* | :heavy_check_mark: | The queue description. | +| `isDefault` | *bool* | :heavy_check_mark: | Whether this is the default queue of the project. | +| `unresolvedItemsCount` | *int* | :heavy_check_mark: | Number of items that wait for review. | +| `resolvedItemsCount` | *int* | :heavy_check_mark: | Number of items that are resolved. | +| `totalItemsCount` | *int* | :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 500e7af..d583cbf 100644 --- a/docs/Models/Errors/BadRequestError.md +++ b/docs/Models/Errors/BadRequestError.md @@ -5,12 +5,12 @@ The request is malformed or a parameter is invalid. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | -| `code` | [Components\BadRequestErrorCode](../../Models/Components/BadRequestErrorCode.md) | :heavy_check_mark: | Exactly what went wrong. Stable; safe to branch on. New codes may be added.

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

- `invalid_request`: A parameter is invalid. `message` says which one.
- `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the 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` | array<[Components\ErrorIssue](../../Models/Components/ErrorIssue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | +| `requestId` | *string* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | +| `docUrl` | *string* | :heavy_check_mark: | Documentation for this `code`. | | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/Models/Errors/NotFoundError.md b/docs/Models/Errors/NotFoundError.md index 31efd8f..1f5af09 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` | [Components\NotFoundErrorCode](../../Models/Components/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` | array<[Components\ErrorIssue](../../Models/Components/ErrorIssue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | -| `requestId` | *string* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | -| `docUrl` | *string* | :heavy_check_mark: | Documentation for this `code`. | | -| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *string* | :heavy_check_mark: | Broad error category. Stable; safe to switch on. | | +| `code` | [Components\NotFoundErrorCode](../../Models/Components/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` | array<[Components\ErrorIssue](../../Models/Components/ErrorIssue.md)> | :heavy_minus_sign: | Validation problems, when the request body is invalid. | | +| `requestId` | *string* | :heavy_check_mark: | Identifies this request. Include it when you contact support. | h8fkz6kkzoa446ffve37atys | +| `docUrl` | *string* | :heavy_check_mark: | Documentation for this `code`. | | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/docs/Models/Operations/SubmitContentRecommendationAction.md b/docs/Models/Operations/ActionResponse.md similarity index 83% rename from docs/Models/Operations/SubmitContentRecommendationAction.md rename to docs/Models/Operations/ActionResponse.md index 902eb90..3f4de77 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 diff --git a/docs/Models/Operations/ActionStat.md b/docs/Models/Operations/ActionStat.md deleted file mode 100644 index 048633c..0000000 --- a/docs/Models/Operations/ActionStat.md +++ /dev/null @@ -1,11 +0,0 @@ -# ActionStat - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `actionId` | *string* | :heavy_check_mark: | ID of the moderation action | -| `actionName` | *string* | :heavy_check_mark: | Name of the moderation action | -| `count` | *float* | :heavy_check_mark: | Number of times this action was taken | -| `percentageOfTotal` | *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 afc946a..e4e4f12 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 | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\AddWordlistWordsRequestBody](../../Models/Operations/AddWordlistWordsRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to add words to | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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` | [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 0000000..573eeb2 --- /dev/null +++ b/docs/Models/Operations/Bucket.md @@ -0,0 +1,11 @@ +# Bucket + +The size of each entry in `volumes`. + + +## 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 ac73a1e..0000000 --- a/docs/Models/Operations/CasebookAgreement.md +++ /dev/null @@ -1,10 +0,0 @@ -# CasebookAgreement - - -## 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 e554e1e..0000000 --- a/docs/Models/Operations/CasebookAnswer.md +++ /dev/null @@ -1,11 +0,0 @@ -# CasebookAnswer - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `All` | ALL | -| `Allowed` | ALLOWED | -| `Rejected` | REJECTED | -| `NoAnswer` | 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 0000000..ddc5c99 --- /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` | *int* | :heavy_check_mark: | Requests received in this channel. | +| `flagged` | *int* | :heavy_check_mark: | Requests flagged in this channel. | +| `flagRate` | *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 b922538..0000000 --- a/docs/Models/Operations/CheckStatus.md +++ /dev/null @@ -1,10 +0,0 @@ -# CheckStatus - - -## 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 e65e886..d64842c 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` | *bool* | :heavy_check_mark: | N/A | | `flaggedFields` | array<*string*> | :heavy_minus_sign: | The keys of the flagged fields if submitting an object. | -| `labels` | array<[Operations\SubmitContentLabel](../../Models/Operations/SubmitContentLabel.md)> | :heavy_minus_sign: | N/A | +| `labels` | array<[Operations\Label](../../Models/Operations/Label.md)> | :heavy_minus_sign: | N/A | | `data` | array | :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 766426b..b6bb10c 100644 --- a/docs/Models/Operations/CreateActionRequest.md +++ b/docs/Models/Operations/CreateActionRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\CreateActionRequestBody](../../Models/Operations/CreateActionRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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` | [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 4975827..1591283 100644 --- a/docs/Models/Operations/CreateAuthorRequest.md +++ b/docs/Models/Operations/CreateAuthorRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\CreateAuthorRequestBody](../../Models/Operations/CreateAuthorRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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` | [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 0000000..9c74c14 --- /dev/null +++ b/docs/Models/Operations/CreateFeedbackRequest.md @@ -0,0 +1,9 @@ +# CreateFeedbackRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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` | [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 0000000..254ca03 --- /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` | [?Operations\CreateFeedbackType](../../Models/Operations/CreateFeedbackType.md) | :heavy_minus_sign: | The kind of feedback. | +| `source` | [?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 0000000..d39773a --- /dev/null +++ b/docs/Models/Operations/CreateFeedbackResponse.md @@ -0,0 +1,11 @@ +# CreateFeedbackResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?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 0000000..0afb078 --- /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 0000000..19eacdd --- /dev/null +++ b/docs/Models/Operations/CreateFeedbackType.md @@ -0,0 +1,12 @@ +# CreateFeedbackType + +The kind of feedback. + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `FeatureRequest` | 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 0000000..4c2dd87 --- /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` | [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 0000000..3782014 --- /dev/null +++ b/docs/Models/Operations/CreateProjectApiKeyRequestBody.md @@ -0,0 +1,8 @@ +# CreateProjectApiKeyRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *?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 0000000..ad5bbb2 --- /dev/null +++ b/docs/Models/Operations/CreateProjectApiKeyResponse.md @@ -0,0 +1,11 @@ +# CreateProjectApiKeyResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `projectApiKey` | [?Components\ProjectApiKey](../../Models/Components/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 3c1fba1..048b817 100644 --- a/docs/Models/Operations/CreateWebhookRequest.md +++ b/docs/Models/Operations/CreateWebhookRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\CreateWebhookRequestBody](../../Models/Operations/CreateWebhookRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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` | [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 0000000..8a5c18a --- /dev/null +++ b/docs/Models/Operations/CreateWordlistRequest.md @@ -0,0 +1,9 @@ +# CreateWordlistRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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` | [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 0000000..61d69fc --- /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` | *?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` | *?string* | :heavy_minus_sign: | Description of the wordlist | +| `words` | 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 0000000..2a5baf0 --- /dev/null +++ b/docs/Models/Operations/CreateWordlistResponse.md @@ -0,0 +1,11 @@ +# CreateWordlistResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?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 0000000..b6e3269 --- /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` | *string* | :heavy_check_mark: | N/A | +| `words` | array<*string*> | :heavy_check_mark: | Words in the wordlist | +| `createdAt` | *string* | :heavy_check_mark: | Creation date of the wordlist | +| `organizationId` | *string* | :heavy_check_mark: | ID of the organization | +| `userId` | *string* | :heavy_check_mark: | N/A | +| `strict` | *bool* | :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 b67541b..a91bab0 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` | *int* | :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 dbd3ebb..50208a7 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. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to delete. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 cea8b19..ea3bb5b 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. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 29e93dc..93366e8 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. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to delete. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 d401887..8201f6c 100644 --- a/docs/Models/Operations/ExecuteActionRequest.md +++ b/docs/Models/Operations/ExecuteActionRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\ExecuteActionRequestBody](../../Models/Operations/ExecuteActionRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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` | [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 052a284..0000000 --- a/docs/Models/Operations/Filter.md +++ /dev/null @@ -1,32 +0,0 @@ -# Filter - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `isFlagged` | [?Operations\IsFlagged](../../Models/Operations/IsFlagged.md) | :heavy_minus_sign: | N/A | -| `casebookAnswer` | [?Operations\CasebookAnswer](../../Models/Operations/CasebookAnswer.md) | :heavy_minus_sign: | N/A | -| `casebookAgreement` | [?Operations\CasebookAgreement](../../Models/Operations/CasebookAgreement.md) | :heavy_minus_sign: | N/A | -| `labels` | array<*string*> | :heavy_minus_sign: | N/A | -| `filterLabels` | array<[Operations\FilterLabel](../../Models/Operations/FilterLabel.md)> | :heavy_minus_sign: | N/A | -| `metadataFilters` | array<[Operations\MetadataFilter](../../Models/Operations/MetadataFilter.md)> | :heavy_minus_sign: | N/A | -| `filteredChannelIds` | array<*string*> | :heavy_minus_sign: | N/A | -| `filteredActionIds` | array<*string*> | :heavy_minus_sign: | N/A | -| `languages` | array<*string*> | :heavy_minus_sign: | N/A | -| `contentTypes` | array<[Operations\GetQueueContentType](../../Models/Operations/GetQueueContentType.md)> | :heavy_minus_sign: | N/A | -| `mediaTypes` | array<[Operations\MediaType](../../Models/Operations/MediaType.md)> | :heavy_minus_sign: | N/A | -| `authorTrustLevels` | array<*int*> | :heavy_minus_sign: | N/A | -| `recommendationActions` | array<[Operations\GetQueueRecommendationAction](../../Models/Operations/GetQueueRecommendationAction.md)> | :heavy_minus_sign: | N/A | -| `minSeverity` | *?int* | :heavy_minus_sign: | N/A | -| `maxSeverity` | *?int* | :heavy_minus_sign: | N/A | -| `afterDate` | *?string* | :heavy_minus_sign: | N/A | -| `beforeDate` | *?string* | :heavy_minus_sign: | N/A | -| `within` | *?float* | :heavy_minus_sign: | N/A | -| `withinUnit` | [?Operations\WithinUnit](../../Models/Operations/WithinUnit.md) | :heavy_minus_sign: | N/A | -| `clearDateWindow` | *?bool* | :heavy_minus_sign: | N/A | -| `checkStatus` | [?Operations\CheckStatus](../../Models/Operations/CheckStatus.md) | :heavy_minus_sign: | N/A | -| `authorID` | *?string* | :heavy_minus_sign: | N/A | -| `contentID` | *?string* | :heavy_minus_sign: | N/A | -| `conversationIds` | array<*string*> | :heavy_minus_sign: | N/A | -| `search` | 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 8a144e9..0000000 --- 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` | [Operations\GetQueueType](../../Models/Operations/GetQueueType.md) | :heavy_check_mark: | N/A | -| `minThreshold` | *?float* | :heavy_minus_sign: | N/A | -| `maxThreshold` | *?float* | :heavy_minus_sign: | N/A | \ 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 0000000..52a6cb5 --- /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. | +| `recentFlagRate` | *float* | :heavy_check_mark: | The flag rate in the last 2 days. | +| `baselineFlagRate` | *float* | :heavy_check_mark: | The flag rate in the 30 days before that. | +| `recentFlagged` | *int* | :heavy_check_mark: | Flagged requests in the last 2 days. | +| `recentRequests` | *int* | :heavy_check_mark: | Requests in the last 2 days. | \ 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 dd16d92..0000000 --- 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/GetAccountRequest.md b/docs/Models/Operations/GetAccountRequest.md index a9c44a7..6a3e48d 100644 --- a/docs/Models/Operations/GetAccountRequest.md +++ b/docs/Models/Operations/GetAccountRequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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 6196302..ea167b9 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. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to get. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 0000000..9478606 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAuthorsAuthor.md @@ -0,0 +1,10 @@ +# GetAnalyticsAuthorsAuthor + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `authorId` | *string* | :heavy_check_mark: | The author ID from your system. Use it with the authors endpoints. | +| `name` | *string* | :heavy_check_mark: | The author name, if known. | +| `flagged` | *int* | :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 0000000..bea68b0 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAuthorsQueryParamRange.md @@ -0,0 +1,13 @@ +# 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. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..f71de31 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAuthorsRangeResponse.md @@ -0,0 +1,13 @@ +# GetAnalyticsAuthorsRangeResponse + +The time window of the numbers. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..a01970a --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAuthorsRequest.md @@ -0,0 +1,11 @@ +# GetAnalyticsAuthorsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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` | *?string* | :heavy_minus_sign: | N/A | +| `limit` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 0000000..4d2f621 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAuthorsResponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsAuthorsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?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 0000000..0c521cc --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAuthorsResponseBody.md @@ -0,0 +1,12 @@ +# GetAnalyticsAuthorsResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `range` | [Operations\GetAnalyticsAuthorsRangeResponse](../../Models/Operations/GetAnalyticsAuthorsRangeResponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channelId` | *string* | :heavy_check_mark: | The channel the numbers are for. Null when they are for all channels. | +| `authors` | array<[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 0000000..e64e996 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAutomationQueryParamRange.md @@ -0,0 +1,13 @@ +# 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. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..924bb2e --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAutomationRangeResponse.md @@ -0,0 +1,13 @@ +# GetAnalyticsAutomationRangeResponse + +The time window of the numbers. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..ca31d96 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAutomationRequest.md @@ -0,0 +1,10 @@ +# GetAnalyticsAutomationRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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` | *?string* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 0000000..fa64c8c --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAutomationResponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsAutomationResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?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 0000000..c09d3ed --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsAutomationResponseBody.md @@ -0,0 +1,23 @@ +# GetAnalyticsAutomationResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [Operations\GetAnalyticsAutomationRangeResponse](../../Models/Operations/GetAnalyticsAutomationRangeResponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channelId` | *string* | :heavy_check_mark: | The channel the numbers are for. Null when they are for all channels. | +| `flagged` | *int* | :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. | +| `handledByRules` | *int* | :heavy_check_mark: | Flagged requests that a rule allowed or rejected without human review. | +| `handledByCasebook` | *int* | :heavy_check_mark: | Flagged requests that the casebook settled without human review. | +| `sentToReview` | *int* | :heavy_check_mark: | Distinct content items sent to the review queue. Repeats of the same content count once, as in the queue. | +| `mergedDuplicates` | *int* | :heavy_check_mark: | Flagged requests that the review queue merged into an item it already shows: repeats, edits and content that was settled later. | +| `automationRate` | *float* | :heavy_check_mark: | N/A | +| `reviewsAllowed` | *int* | :heavy_check_mark: | Review queue items from this window that a moderator allowed. | +| `reviewsRejected` | *int* | :heavy_check_mark: | Review queue items from this window that a moderator rejected. | +| `reviewsResolvedWithoutDecision` | *int* | :heavy_check_mark: | Review queue items from this window that a moderator marked as done without allow or reject. | +| `reviewsUnresolved` | *int* | :heavy_check_mark: | Review queue items from this window that are still open. | +| `casebookOverrulings` | *int* | :heavy_check_mark: | Requests where the casebook decision was different from the decision based on severity. | +| `rules` | array<[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 0000000..f73eeef --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsChannelsQueryParamRange.md @@ -0,0 +1,13 @@ +# 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. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..694fb0f --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsChannelsRangeResponse.md @@ -0,0 +1,13 @@ +# GetAnalyticsChannelsRangeResponse + +The time window of the numbers. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..5d7ff08 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsChannelsRequest.md @@ -0,0 +1,9 @@ +# GetAnalyticsChannelsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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. | +| `projectId` | *?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 0000000..13ef51e --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsChannelsResponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsChannelsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?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 0000000..1d17851 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsChannelsResponseBody.md @@ -0,0 +1,11 @@ +# GetAnalyticsChannelsResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `range` | [Operations\GetAnalyticsChannelsRangeResponse](../../Models/Operations/GetAnalyticsChannelsRangeResponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channels` | array<[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 0000000..3957ad3 --- /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` | *int* | :heavy_check_mark: | Flagged requests with this label in the window. Repeats count each time. | +| `previousFlagged` | *int* | :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 0000000..a39f267 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsPoliciesQueryParamRange.md @@ -0,0 +1,13 @@ +# 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. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..ffc509b --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsPoliciesRangeResponse.md @@ -0,0 +1,13 @@ +# GetAnalyticsPoliciesRangeResponse + +The time window of the numbers. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..ecdade0 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsPoliciesRequest.md @@ -0,0 +1,11 @@ +# GetAnalyticsPoliciesRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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` | *?string* | :heavy_minus_sign: | N/A | +| `limit` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 0000000..32a1399 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsPoliciesResponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsPoliciesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?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 0000000..6b0e5fd --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsPoliciesResponseBody.md @@ -0,0 +1,12 @@ +# GetAnalyticsPoliciesResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `range` | [Operations\GetAnalyticsPoliciesRangeResponse](../../Models/Operations/GetAnalyticsPoliciesRangeResponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channelId` | *string* | :heavy_check_mark: | The channel the numbers are for. Null when they are for all channels. | +| `policies` | array<[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 0000000..8e282a0 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsSummaryQueryParamRange.md @@ -0,0 +1,13 @@ +# 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. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..958d87f --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsSummaryRangeResponse.md @@ -0,0 +1,13 @@ +# GetAnalyticsSummaryRangeResponse + +The time window of the numbers. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..d955cb9 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsSummaryRequest.md @@ -0,0 +1,10 @@ +# GetAnalyticsSummaryRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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` | *?string* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 0000000..f6bbba5 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsSummaryResponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsSummaryResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?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 0000000..029b13d --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsSummaryResponseBody.md @@ -0,0 +1,15 @@ +# GetAnalyticsSummaryResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [Operations\GetAnalyticsSummaryRangeResponse](../../Models/Operations/GetAnalyticsSummaryRangeResponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channelId` | *string* | :heavy_check_mark: | The channel the numbers are for. Null when they are for all channels. | +| `totals` | [Operations\Totals](../../Models/Operations/Totals.md) | :heavy_check_mark: | Request counts for the window. A flagged request has one recommendation: allow, reject or review. | +| `previousPeriod` | [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. | +| `pendingReview` | *int* | :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. | +| `flagRateSpike` | [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 0000000..46e3a5a --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsVolumesQueryParamRange.md @@ -0,0 +1,13 @@ +# 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. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..9129e76 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsVolumesRangeResponse.md @@ -0,0 +1,13 @@ +# GetAnalyticsVolumesRangeResponse + +The time window of the numbers. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `TwentyFourh` | 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 0000000..e6a0d68 --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsVolumesRequest.md @@ -0,0 +1,10 @@ +# GetAnalyticsVolumesRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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` | *?string* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 0000000..e623ffd --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsVolumesResponse.md @@ -0,0 +1,11 @@ +# GetAnalyticsVolumesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?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 0000000..4825b9b --- /dev/null +++ b/docs/Models/Operations/GetAnalyticsVolumesResponseBody.md @@ -0,0 +1,13 @@ +# GetAnalyticsVolumesResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `range` | [Operations\GetAnalyticsVolumesRangeResponse](../../Models/Operations/GetAnalyticsVolumesRangeResponse.md) | :heavy_check_mark: | The time window of the numbers. | +| `channelId` | *string* | :heavy_check_mark: | The channel the numbers are for. Null when they are for all channels. | +| `bucket` | [Operations\Bucket](../../Models/Operations/Bucket.md) | :heavy_check_mark: | The size of each entry in `volumes`. | +| `volumes` | array<[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 1e67edc..22403b6 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. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 83f9af1..0000000 --- a/docs/Models/Operations/GetQueueContentType.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetQueueContentType - - -## 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 c073a55..0000000 --- a/docs/Models/Operations/GetQueueRecommendationAction.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetQueueRecommendationAction - - -## 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 9b0dfb6..7bd73d4 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 | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID. | +| `projectId` | *?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 b670ca7..57f409f 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` | [Operations\Queue](../../Models/Operations/Queue.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `queue` | [Components\QueueWithCounts](../../Models/Components/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 011ae07..8eb9fbb 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 | -| `withinDays` | *?int* | :heavy_minus_sign: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID. | +| `withinDays` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 287f20f..627cf3d 100644 --- a/docs/Models/Operations/GetQueueStatsResponseBody.md +++ b/docs/Models/Operations/GetQueueStatsResponseBody.md @@ -8,6 +8,5 @@ Successful response | Field | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `reviewStats` | [Operations\ReviewStats](../../Models/Operations/ReviewStats.md) | :heavy_check_mark: | N/A | -| `actionStats` | array<[Operations\ActionStat](../../Models/Operations/ActionStat.md)> | :heavy_check_mark: | N/A | -| `topReviewers` | array<[Operations\TopReviewer](../../Models/Operations/TopReviewer.md)> | :heavy_check_mark: | List of top reviewers and their statistics | +| `topReviewers` | array<[Operations\TopReviewer](../../Models/Operations/TopReviewer.md)> | :heavy_check_mark: | Reviewers with the most resolved items, most first. Up to 10. | | `trends` | [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 9225b36..0000000 --- a/docs/Models/Operations/GetQueueType.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetQueueType - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Flagged` | FLAGGED | -| `NotFlagged` | 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 7376be9..60776d4 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. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to get. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 a266473..c6304da 100644 --- a/docs/Models/Operations/GetWebhookSecretRequest.md +++ b/docs/Models/Operations/GetWebhookSecretRequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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 d365ad9..1280fbe 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 | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 36bf8ca..e5382a6 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 | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to get | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 ca65e04..0000000 --- a/docs/Models/Operations/IsFlagged.md +++ /dev/null @@ -1,11 +0,0 @@ -# IsFlagged - - -## Values - -| Name | Value | -| --------------- | --------------- | -| `All` | ALL | -| `Flagged` | FLAGGED | -| `NotFlagged` | NOT_FLAGGED | -| `ShadowFlagged` | 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 f7d5eb9..376c2c2 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 06d1b9f..ed2525c 100644 --- a/docs/Models/Operations/ListActionsRequest.md +++ b/docs/Models/Operations/ListActionsRequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `queueId` | *?string* | :heavy_minus_sign: | N/A | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queueId` | *?string* | :heavy_minus_sign: | N/A | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 b8673e1..1922e09 100644 --- a/docs/Models/Operations/ListAuthorsRequest.md +++ b/docs/Models/Operations/ListAuthorsRequest.md @@ -3,13 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | -| `sortBy` | [?Operations\SortBy](../../Models/Operations/SortBy.md) | :heavy_minus_sign: | N/A | -| `sortDirection` | [?Operations\ListAuthorsSortDirection](../../Models/Operations/ListAuthorsSortDirection.md) | :heavy_minus_sign: | Sort direction | -| `memberSinceDate` | *?string* | :heavy_minus_sign: | N/A | -| `lastActiveDate` | *?string* | :heavy_minus_sign: | N/A | -| `contentTypes` | array<*string*> | :heavy_minus_sign: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `sortBy` | [?Operations\SortBy](../../Models/Operations/SortBy.md) | :heavy_minus_sign: | N/A | +| `sortDirection` | [?Operations\SortDirection](../../Models/Operations/SortDirection.md) | :heavy_minus_sign: | Sort direction | +| `memberSinceDate` | *?string* | :heavy_minus_sign: | N/A | +| `lastActiveDate` | *?string* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 228f291..0000000 --- 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` | *?string* | :heavy_minus_sign: | Action comment | -| `timestamp` | *float* | :heavy_check_mark: | Unix timestamp of when the action was taken | -| `reviewer` | *?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 be262a8..0000000 --- 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` | *?string* | :heavy_minus_sign: | Content language | -| `labels` | array<[Operations\ListQueueItemsLabel](../../Models/Operations/ListQueueItemsLabel.md)> | :heavy_check_mark: | N/A | -| `conversationId` | *?string* | :heavy_minus_sign: | Conversation ID | -| `authorId` | *?string* | :heavy_minus_sign: | Author ID | -| `actions` | array<[Operations\ListQueueItemsAction](../../Models/Operations/ListQueueItemsAction.md)> | :heavy_minus_sign: | Action IDs taken on this item | -| `flagged` | *bool* | :heavy_check_mark: | Whether the item is flagged by any label | -| `status` | [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 | -| `contentType` | *?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 26f405e..0000000 --- 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` | *bool* | :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 b9f9bf7..ed8b295 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` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | -| `sortField` | [?Operations\SortField](../../Models/Operations/SortField.md) | :heavy_minus_sign: | N/A | -| `sortDirection` | [?Operations\ListQueueItemsSortDirection](../../Models/Operations/ListQueueItemsSortDirection.md) | :heavy_minus_sign: | Sort direction | -| `conversationIds` | array<*string*> | :heavy_minus_sign: | N/A | -| `labels` | array<*string*> | :heavy_minus_sign: | N/A | -| `afterDate` | *?string* | :heavy_minus_sign: | N/A | -| `beforeDate` | *?string* | :heavy_minus_sign: | N/A | -| `includeResolved` | *?bool* | :heavy_minus_sign: | N/A | -| `authorId` | *?string* | :heavy_minus_sign: | N/A | -| `filteredActionIds` | array<*string*> | :heavy_minus_sign: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID. | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `sort` | [?Operations\Sort](../../Models/Operations/Sort.md) | :heavy_minus_sign: | N/A | +| `includeResolved` | *?bool* | :heavy_minus_sign: | N/A | +| `conversationIds` | array<*string*> | :heavy_minus_sign: | N/A | +| `labels` | array<*string*> | :heavy_minus_sign: | N/A | +| `authorId` | *?string* | :heavy_minus_sign: | N/A | +| `filteredActionIds` | array<*string*> | :heavy_minus_sign: | N/A | +| `afterDate` | *?string* | :heavy_minus_sign: | N/A | +| `beforeDate` | *?string* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 ff0cdbd..f21c3a2 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` | array<[Operations\ListQueueItemsData](../../Models/Operations/ListQueueItemsData.md)> | :heavy_check_mark: | The items on this page. | -| `pagination` | [Components\Pagination](../../Models/Components/Pagination.md) | :heavy_check_mark: | Where this page is in the full list. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `data` | array<[Components\QueueItem](../../Models/Components/QueueItem.md)> | :heavy_check_mark: | The items on this page. | +| `pagination` | [Components\Pagination](../../Models/Components/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 3ce34d7..0000000 --- a/docs/Models/Operations/ListQueueItemsSortDirection.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListQueueItemsSortDirection - -Sort direction - - -## 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 0000000..14f1c7b --- /dev/null +++ b/docs/Models/Operations/ListQueuesRequest.md @@ -0,0 +1,10 @@ +# ListQueuesRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 0000000..bd1f33f --- /dev/null +++ b/docs/Models/Operations/ListQueuesResponse.md @@ -0,0 +1,11 @@ +# ListQueuesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?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 0000000..dd3e8ed --- /dev/null +++ b/docs/Models/Operations/ListQueuesResponseBody.md @@ -0,0 +1,11 @@ +# ListQueuesResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `data` | array<[Components\Queue](../../Models/Components/Queue.md)> | :heavy_check_mark: | The items on this page. | +| `pagination` | [Components\Pagination](../../Models/Components/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 8e2e5ba..db0e093 100644 --- a/docs/Models/Operations/ListWebhooksRequest.md +++ b/docs/Models/Operations/ListWebhooksRequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 edafc20..943f11e 100644 --- a/docs/Models/Operations/ListWordlistsRequest.md +++ b/docs/Models/Operations/ListWordlistsRequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 361f4b2..0000000 --- a/docs/Models/Operations/MediaType.md +++ /dev/null @@ -1,12 +0,0 @@ -# MediaType - - -## 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/PreviousPeriod.md b/docs/Models/Operations/PreviousPeriod.md new file mode 100644 index 0000000..e1fabbb --- /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` | *int* | :heavy_check_mark: | Requests received. Every request counts, also repeats and edits of the same content. | +| `flagged` | *int* | :heavy_check_mark: | Requests that were flagged. | +| `flagRate` | *float* | :heavy_check_mark: | The share of requests that were flagged: flagged / requests. 0 when there were no requests. | +| `allowed` | *int* | :heavy_check_mark: | Requests with the recommendation "allow". Includes content that was not flagged. | +| `rejected` | *int* | :heavy_check_mark: | Requests with the recommendation "reject". All of them were flagged. | +| `sentToReview` | *int* | :heavy_check_mark: | Requests with the recommendation "review". This counts requests, not the deduplicated items in the review queue. | +| `handledAutomatically` | *int* | :heavy_check_mark: | Flagged requests that were settled without human review: rejected plus flaggedButAllowed. | +| `flaggedButAllowed` | *int* | :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 faca6b1..0000000 --- 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` | [Operations\Filter](../../Models/Operations/Filter.md) | :heavy_check_mark: | N/A | -| `unresolvedItemsCount` | *float* | :heavy_check_mark: | N/A | -| `resolvedItemsCount` | *float* | :heavy_check_mark: | N/A | -| `totalItemsCount` | *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 7154534..604cd01 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` | [Operations\SubmitContentRecommendationAction](../../Models/Operations/SubmitContentRecommendationAction.md) | :heavy_check_mark: | The action to take based on the recommendation | +| `action` | [Operations\ActionResponse](../../Models/Operations/ActionResponse.md) | :heavy_check_mark: | The action to take based on the recommendation | | `reasonCodes` | array<[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. | | `matchedRules` | array<[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 3ac749d..7655a6b 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` | array<*string*> | :heavy_check_mark: | Array of words to remove from the wordlist | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | array<*string*> | :heavy_check_mark: | Array of words to remove from the wordlist | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 b62bc60..c20fe88 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 | -| `itemId` | *string* | :heavy_check_mark: | The item ID to resolve | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\ResolveQueueItemRequestBody](../../Models/Operations/ResolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID. | +| `itemId` | *string* | :heavy_check_mark: | The item ID to resolve. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 74e03e8..0000000 --- a/docs/Models/Operations/ResolveQueueItemRequestBody.md +++ /dev/null @@ -1,8 +0,0 @@ -# ResolveQueueItemRequestBody - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `comment` | *?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 21d44bd..1dfe803 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` | *bool* | :heavy_check_mark: | N/A | -| `resolvedAt` | *string* | :heavy_check_mark: | Timestamp when the item was resolved | -| `comment` | *?string* | :heavy_minus_sign: | Optional comment | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `success` | *bool* | :heavy_check_mark: | N/A | +| `resolvedAt` | *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 0000000..d278573 --- /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. | +| `projectId` | *?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` | [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 0000000..0290f2e --- /dev/null +++ b/docs/Models/Operations/ResolveQueueItemsRequestBody.md @@ -0,0 +1,8 @@ +# ResolveQueueItemsRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `itemIds` | 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 0000000..6ce5367 --- /dev/null +++ b/docs/Models/Operations/ResolveQueueItemsResponse.md @@ -0,0 +1,11 @@ +# ResolveQueueItemsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?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 0000000..a8eb8a5 --- /dev/null +++ b/docs/Models/Operations/ResolveQueueItemsResponseBody.md @@ -0,0 +1,11 @@ +# ResolveQueueItemsResponseBody + +Successful response + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `resolved` | *int* | :heavy_check_mark: | Number of items resolved. | +| `notFoundIds` | 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 77519fb..07e78e7 100644 --- a/docs/Models/Operations/ReviewStats.md +++ b/docs/Models/Operations/ReviewStats.md @@ -3,8 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `averageTimeToReview` | *float* | :heavy_check_mark: | Average time in milliseconds to review an item | -| `totalReviewed` | *float* | :heavy_check_mark: | Total number of items reviewed | -| `totalPending` | *float* | :heavy_check_mark: | Total number of items pending review | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `totalReviewed` | *int* | :heavy_check_mark: | Number of items resolved in this queue in the period. | +| `totalPending` | *int* | :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 0000000..39a452b --- /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` | *int* | :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 0000000..0f50b1f --- /dev/null +++ b/docs/Models/Operations/Sort.md @@ -0,0 +1,11 @@ +# Sort + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `Fifo` | FIFO | +| `Lifo` | LIFO | +| `Random` | RANDOM | +| `SeverityDesc` | SEVERITY_DESC | \ No newline at end of file diff --git a/docs/Models/Operations/SortBy.md b/docs/Models/Operations/SortBy.md index 365e410..033b7da 100644 --- a/docs/Models/Operations/SortBy.md +++ b/docs/Models/Operations/SortBy.md @@ -7,7 +7,6 @@ | --------------------- | --------------------- | | `TrustLevel` | trustLevel | | `ViolationCount` | violationCount | -| `ReportCount` | reportCount | | `MemberSince` | memberSince | | `LastActive` | lastActive | | `ContentCount` | contentCount | diff --git a/docs/Models/Operations/ListAuthorsSortDirection.md b/docs/Models/Operations/SortDirection.md similarity index 80% rename from docs/Models/Operations/ListAuthorsSortDirection.md rename to docs/Models/Operations/SortDirection.md index 725baec..d51bc8c 100644 --- a/docs/Models/Operations/ListAuthorsSortDirection.md +++ b/docs/Models/Operations/SortDirection.md @@ -1,4 +1,4 @@ -# ListAuthorsSortDirection +# SortDirection Sort direction diff --git a/docs/Models/Operations/SortField.md b/docs/Models/Operations/SortField.md deleted file mode 100644 index 67d8777..0000000 --- a/docs/Models/Operations/SortField.md +++ /dev/null @@ -1,10 +0,0 @@ -# SortField - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `CreatedAt` | createdAt | -| `Severity` | severity | -| `ReviewedAt` | 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 0000000..e3c9b0d --- /dev/null +++ b/docs/Models/Operations/Source.md @@ -0,0 +1,13 @@ +# Source + +Where the feedback was written: MCP server, agent skill, CLI or API. + + +## 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 44c877d..084b192 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/PolicyResponse.md b/docs/Models/Operations/SubmitContentPolicyResponse.md similarity index 92% rename from docs/Models/Operations/PolicyResponse.md rename to docs/Models/Operations/SubmitContentPolicyResponse.md index 77b03e7..934f4ab 100644 --- a/docs/Models/Operations/PolicyResponse.md +++ b/docs/Models/Operations/SubmitContentPolicyResponse.md @@ -1,4 +1,4 @@ -# PolicyResponse +# SubmitContentPolicyResponse Policy output schema. diff --git a/docs/Models/Operations/SubmitContentRequest.md b/docs/Models/Operations/SubmitContentRequest.md index 81faf44..1ed01c2 100644 --- a/docs/Models/Operations/SubmitContentRequest.md +++ b/docs/Models/Operations/SubmitContentRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\SubmitContentRequestBody](../../Models/Operations/SubmitContentRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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` | [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 6779e09..4ff4627 100644 --- a/docs/Models/Operations/SubmitContentRequestBody.md +++ b/docs/Models/Operations/SubmitContentRequestBody.md @@ -14,5 +14,5 @@ | `conversationId` | *?string* | :heavy_minus_sign: | For example the ID of a chat room or a post | | `metadata` | array | :heavy_minus_sign: | Any metadata you want to store with the content | | `clientAction` | [?Operations\ClientAction](../../Models/Operations/ClientAction.md) | :heavy_minus_sign: | A recommendation from your own client-side flagging (e.g. a banned-IP list or a third-party tool). Feeds the rules engine and can escalate or override the recommended action. Does not change whether our analysis flagged the content. | -| `doNotStore` | *?bool* | :heavy_minus_sign: | Do not store the content. The content won't enter the review queue | +| `doNotStore` | *?bool* | :heavy_minus_sign: | Process the content without saving it on our servers. The item is still created and appears in the review queue, analytics and author history with its moderation results, but its content is empty, so reviewers cannot see what was submitted. | | `policies` | array<[Operations\Toxicity\|Operations\PersonalInformation\|Operations\Hate\|Operations\Illicit\|Operations\IllicitDrugs\|Operations\IllicitAlcohol\|Operations\IllicitFirearms\|Operations\IllicitTobacco\|Operations\IllicitGambling\|Operations\Cannabis\|Operations\Adult\|Operations\Crypto\|Operations\Sexual\|Operations\SexualMinors\|Operations\Profanity\|Operations\Violence\|Operations\SelfHarm\|Operations\Spam\|Operations\LowQualityContent\|Operations\FaceDetection\|Operations\SelfPromotion\|Operations\Political\|Operations\Religion\|Operations\Threat\|Operations\SexualSolicitation\|Operations\ChannelCircumvention\|Operations\IllegalTrade\|Operations\Alcohol\|Operations\Drugs\|Operations\Gambling\|Operations\Tobacco\|Operations\Weapons\|Operations\Promotion\|Operations\Extremism\|Operations\CodeAbuse\|Operations\UnicodeSpoofing\|Operations\PIIMasking\|Operations\URLMasking\|Operations\URLRisk\|Operations\Guideline](../../Models/Operations/PolicyRequest.md)> | :heavy_minus_sign: | (Enterprise) override the channel policies for this moderation request only. | \ No newline at end of file diff --git a/docs/Models/Operations/SubmitContentResponseBody.md b/docs/Models/Operations/SubmitContentResponseBody.md index d525632..fcbe814 100644 --- a/docs/Models/Operations/SubmitContentResponseBody.md +++ b/docs/Models/Operations/SubmitContentResponseBody.md @@ -8,11 +8,11 @@ Successful response | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `content` | [Operations\ContentResponse](../../Models/Operations/ContentResponse.md) | :heavy_check_mark: | Potentially modified content. | -| `author` | [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` | [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` | [Operations\Evaluation](../../Models/Operations/Evaluation.md) | :heavy_check_mark: | The evaluation of the content after running the channel policies. | | `recommendation` | [Operations\Recommendation](../../Models/Operations/Recommendation.md) | :heavy_check_mark: | The recommendation for the content based on the evaluation. | | `casebook` | [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` | array<[Operations\ClassifierOutput\|Operations\EntityMatcherOutput](../../Models/Operations/PolicyResponse.md)> | :heavy_check_mark: | Results of all policies in the channel. Sorted by highest probability. | +| `policies` | array<[Operations\ClassifierOutput\|Operations\EntityMatcherOutput](../../Models/Operations/SubmitContentPolicyResponse.md)> | :heavy_check_mark: | Results of all policies in the channel. Sorted by highest probability. | | `insights` | array<[Operations\SentimentInsight\|Operations\LanguageInsight\|Operations\CuriosityInsight\|Operations\RespectInsight\|Operations\PersonalStoryInsight\|Operations\CompassionInsight](../../Models/Operations/Insight.md)> | :heavy_check_mark: | Results of all insights enabled in the channel. | | `meta` | [Operations\Meta](../../Models/Operations/Meta.md) | :heavy_check_mark: | Metadata about the moderation request | | `errors` | array<[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 2f4ef9d..0000000 --- a/docs/Models/Operations/TopAction.md +++ /dev/null @@ -1,10 +0,0 @@ -# TopAction - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `actionId` | *string* | :heavy_check_mark: | Most used action by this reviewer | -| `actionName` | *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 54df1a0..7b5b6cb 100644 --- a/docs/Models/Operations/TopReviewer.md +++ b/docs/Models/Operations/TopReviewer.md @@ -3,11 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `userId` | *string* | :heavy_check_mark: | ID of the reviewer | -| `name` | *string* | :heavy_check_mark: | Name of the reviewer | -| `reviewCount` | *float* | :heavy_check_mark: | Number of items reviewed | -| `averageTimePerReview` | *float* | :heavy_check_mark: | Average review time in milliseconds | -| `accuracyScore` | *?float* | :heavy_minus_sign: | Optional accuracy score based on review quality metrics | -| `topActions` | array<[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 | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The user ID of the reviewer. `null` for items resolved with an API key. | +| `name` | *string* | :heavy_check_mark: | The name of the reviewer. | +| `reviewCount` | *int* | :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 0000000..1ce078a --- /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` | *int* | :heavy_check_mark: | Requests received. Every request counts, also repeats and edits of the same content. | +| `flagged` | *int* | :heavy_check_mark: | Requests that were flagged. | +| `flagRate` | *float* | :heavy_check_mark: | The share of requests that were flagged: flagged / requests. 0 when there were no requests. | +| `allowed` | *int* | :heavy_check_mark: | Requests with the recommendation "allow". Includes content that was not flagged. | +| `rejected` | *int* | :heavy_check_mark: | Requests with the recommendation "reject". All of them were flagged. | +| `sentToReview` | *int* | :heavy_check_mark: | Requests with the recommendation "review". This counts requests, not the deduplicated items in the review queue. | +| `handledAutomatically` | *int* | :heavy_check_mark: | Flagged requests that were settled without human review: rejected plus flaggedButAllowed. | +| `flaggedButAllowed` | *int* | :heavy_check_mark: | Flagged requests that were allowed without human review. | +| `distinctAuthors` | *int* | :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 0931739..c6c0236 100644 --- a/docs/Models/Operations/Trends.md +++ b/docs/Models/Operations/Trends.md @@ -3,7 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `dailyReviewCounts` | array<[Operations\DailyReviewCount](../../Models/Operations/DailyReviewCount.md)> | :heavy_check_mark: | N/A | -| `flaggedContentTrends` | array<[Operations\FlaggedContentTrend](../../Models/Operations/FlaggedContentTrend.md)> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `dailyReviewCounts` | array<[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 9de10a7..40e66b4 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 | -| `itemId` | *string* | :heavy_check_mark: | The item ID to unresolve | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\UnresolveQueueItemRequestBody](../../Models/Operations/UnresolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID. | +| `itemId` | *string* | :heavy_check_mark: | The item ID to unresolve. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 4243a05..0000000 --- a/docs/Models/Operations/UnresolveQueueItemRequestBody.md +++ /dev/null @@ -1,8 +0,0 @@ -# UnresolveQueueItemRequestBody - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `comment` | *?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 eb73c97..4b2588a 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` | *bool* | :heavy_check_mark: | N/A | -| `status` | *string* | :heavy_check_mark: | New status of the item | -| `unresolvedAt` | *string* | :heavy_check_mark: | Timestamp when the item was unresolved | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `success` | *bool* | :heavy_check_mark: | N/A | +| `status` | [Operations\UnresolveQueueItemStatus](../../Models/Operations/UnresolveQueueItemStatus.md) | :heavy_check_mark: | `pending` waits for review. `resolved` is reviewed. | +| `unresolvedAt` | *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 0000000..cca925a --- /dev/null +++ b/docs/Models/Operations/UnresolveQueueItemStatus.md @@ -0,0 +1,11 @@ +# UnresolveQueueItemStatus + +`pending` waits for review. `resolved` is reviewed. + + +## 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 02cc4f8..f381aef 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. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\UpdateActionRequestBody](../../Models/Operations/UpdateActionRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to update. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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` | [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 b3e5c29..eb33b27 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. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\UpdateAuthorRequestBody](../../Models/Operations/UpdateAuthorRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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` | [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 255005c..5234be5 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. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\UpdateWebhookRequestBody](../../Models/Operations/UpdateWebhookRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to update. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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` | [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 c071390..300f1e3 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 | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | -| `body` | [Operations\UpdateWordlistRequestBody](../../Models/Operations/UpdateWordlistRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to update | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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` | [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 d4be52f..83591f8 100644 --- a/docs/Models/Operations/UpdateWordlistRequestBody.md +++ b/docs/Models/Operations/UpdateWordlistRequestBody.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `name` | *?string* | :heavy_minus_sign: | New name for the wordlist | -| `key` | *?string* | :heavy_minus_sign: | New key for the wordlist | -| `description` | *?string* | :heavy_minus_sign: | New description for the wordlist | -| `words` | array<*string*> | :heavy_minus_sign: | New words for the wordlist. Replace the existing words with these new ones. Duplicate words will be ignored. | -| `strict` | *?bool* | :heavy_minus_sign: | Deprecated. Now using threshold in project settings. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *?string* | :heavy_minus_sign: | New name for the wordlist | +| `key` | *?string* | :heavy_minus_sign: | New key for the wordlist | +| `description` | *?string* | :heavy_minus_sign: | New description for the wordlist | +| `words` | 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` | *?bool* | :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 0000000..a064eb8 --- /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` | *int* | :heavy_check_mark: | Requests received in the bucket. | +| `flagged` | *int* | :heavy_check_mark: | Requests flagged in the bucket. | +| `rejected` | *int* | :heavy_check_mark: | Requests with the recommendation "reject" in the bucket. | +| `sentToReview` | *int* | :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 6f52a87..0000000 --- a/docs/Models/Operations/WithinUnit.md +++ /dev/null @@ -1,13 +0,0 @@ -# WithinUnit - - -## 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 1826ff3..ad42e1d 100644 --- a/docs/sdks/account/README.md +++ b/docs/sdks/account/README.md @@ -39,9 +39,9 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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 3db0602..af6f771 100644 --- a/docs/sdks/actions/README.md +++ b/docs/sdks/actions/README.md @@ -49,12 +49,12 @@ foreach ($responses as $response) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `queueId` | *?string* | :heavy_minus_sign: | N/A | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `queueId` | *?string* | :heavy_minus_sign: | N/A | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -111,10 +111,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `body` | [Operations\CreateActionRequestBody](../../Models/Operations/CreateActionRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\CreateActionRequestBody](../../Models/Operations/CreateActionRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -163,10 +163,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the action to get. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to get. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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,11 +218,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the action to update. | -| `body` | [Operations\UpdateActionRequestBody](../../Models/Operations/UpdateActionRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to update. | +| `body` | [Operations\UpdateActionRequestBody](../../Models/Operations/UpdateActionRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -272,10 +272,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the action to delete. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the action to delete. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -330,10 +330,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `body` | [Operations\ExecuteActionRequestBody](../../Models/Operations/ExecuteActionRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\ExecuteActionRequestBody](../../Models/Operations/ExecuteActionRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 0000000..3b8f601 --- /dev/null +++ b/docs/sdks/analytics/README.md @@ -0,0 +1,353 @@ +# 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 + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use ModerationApi; +use ModerationApi\Models\Operations; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + + + +$response = $sdk->analytics->summary( + range: Operations\GetAnalyticsSummaryQueryParamRange::Thirtyd +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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` | *?string* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 + +**[?Operations\GetAnalyticsSummaryResponse](../../Models/Operations/GetAnalyticsSummaryResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\PermissionDeniedError | 403 | application/json | +| Errors\NotFoundError | 404 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\APIException | 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 + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use ModerationApi; +use ModerationApi\Models\Operations; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + + + +$response = $sdk->analytics->policies( + range: Operations\GetAnalyticsPoliciesQueryParamRange::Thirtyd, + limit: 8 + +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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` | *?string* | :heavy_minus_sign: | N/A | +| `limit` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 + +**[?Operations\GetAnalyticsPoliciesResponse](../../Models/Operations/GetAnalyticsPoliciesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\PermissionDeniedError | 403 | application/json | +| Errors\NotFoundError | 404 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## authors + +Get the authors with the most flagged content in a time window, largest first. + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use ModerationApi; +use ModerationApi\Models\Operations; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + + + +$response = $sdk->analytics->authors( + range: Operations\GetAnalyticsAuthorsQueryParamRange::Thirtyd, + limit: 6 + +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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` | *?string* | :heavy_minus_sign: | N/A | +| `limit` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 + +**[?Operations\GetAnalyticsAuthorsResponse](../../Models/Operations/GetAnalyticsAuthorsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\PermissionDeniedError | 403 | application/json | +| Errors\NotFoundError | 404 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## channels + +Get requests, flags and flag rate for each channel of the project in a time window. + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use ModerationApi; +use ModerationApi\Models\Operations; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + + + +$response = $sdk->analytics->channels( + range: Operations\GetAnalyticsChannelsQueryParamRange::Thirtyd +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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. | +| `projectId` | *?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 + +**[?Operations\GetAnalyticsChannelsResponse](../../Models/Operations/GetAnalyticsChannelsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\PermissionDeniedError | 403 | application/json | +| Errors\NotFoundError | 404 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## volumes + +Get requests, flags, rejections and reviews per hour (24h) or per day (7d, 30d, 90d), oldest first. + +### Example Usage + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use ModerationApi; +use ModerationApi\Models\Operations; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + + + +$response = $sdk->analytics->volumes( + range: Operations\GetAnalyticsVolumesQueryParamRange::Thirtyd +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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` | *?string* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 + +**[?Operations\GetAnalyticsVolumesResponse](../../Models/Operations/GetAnalyticsVolumesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\PermissionDeniedError | 403 | application/json | +| Errors\NotFoundError | 404 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\APIException | 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 + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use ModerationApi; +use ModerationApi\Models\Operations; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + + + +$response = $sdk->analytics->automation( + range: Operations\GetAnalyticsAutomationQueryParamRange::Thirtyd +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `range` | [?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` | *?string* | :heavy_minus_sign: | N/A | +| `projectId` | *?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 + +**[?Operations\GetAnalyticsAutomationResponse](../../Models/Operations/GetAnalyticsAutomationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\PermissionDeniedError | 403 | application/json | +| Errors\NotFoundError | 404 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\APIException | 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 0000000..cc37086 --- /dev/null +++ b/docs/sdks/apikeys/README.md @@ -0,0 +1,63 @@ +# 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 + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use ModerationApi; +use ModerationApi\Models\Operations; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + +$body = new Operations\CreateProjectApiKeyRequestBody(); + +$response = $sdk->projects->apiKeys->create( + id: '', + body: $body + +); + +if ($response->projectApiKey !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | The ID of the project. | +| `body` | [Operations\CreateProjectApiKeyRequestBody](../../Models/Operations/CreateProjectApiKeyRequestBody.md) | :heavy_check_mark: | N/A | + +### Response + +**[?Operations\CreateProjectApiKeyResponse](../../Models/Operations/CreateProjectApiKeyResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\PermissionDeniedError | 403 | application/json | +| Errors\NotFoundError | 404 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/authors/README.md b/docs/sdks/authors/README.md index b7f87ce..633c5eb 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 @@ -109,10 +109,10 @@ if ($response->publicAuthor !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `body` | [Operations\CreateAuthorRequestBody](../../Models/Operations/CreateAuthorRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\CreateAuthorRequestBody](../../Models/Operations/CreateAuthorRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -162,10 +162,10 @@ if ($response->publicAuthor !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -224,11 +224,11 @@ if ($response->publicAuthor !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `body` | [Operations\UpdateAuthorRequestBody](../../Models/Operations/UpdateAuthorRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `body` | [Operations\UpdateAuthorRequestBody](../../Models/Operations/UpdateAuthorRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -279,10 +279,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Either external ID or the ID assigned by moderation API. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 3c93b00..0439d12 100644 --- a/docs/sdks/content/README.md +++ b/docs/sdks/content/README.md @@ -50,10 +50,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `body` | [Operations\SubmitContentRequestBody](../../Models/Operations/SubmitContentRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\SubmitContentRequestBody](../../Models/Operations/SubmitContentRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 0000000..c378bfc --- /dev/null +++ b/docs/sdks/feedback/README.md @@ -0,0 +1,63 @@ +# 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 + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use ModerationApi; +use ModerationApi\Models\Operations; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + +$body = new Operations\CreateFeedbackRequestBody( + 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: Operations\Source::Mcp, +); + +$response = $sdk->feedback->create( + body: $body +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\CreateFeedbackRequestBody](../../Models/Operations/CreateFeedbackRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?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 + +**[?Operations\CreateFeedbackResponse](../../Models/Operations/CreateFeedbackResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/items/README.md b/docs/sdks/items/README.md index bd4394a..9980f5b 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 +* [resolveMany](#resolvemany) - 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 @@ -69,7 +70,7 @@ foreach ($responses as $response) { ## 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 @@ -79,6 +80,62 @@ declare(strict_types=1); require 'vendor/autoload.php'; +use ModerationApi; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + + + +$response = $sdk->queue->items->resolve( + id: '', + itemId: '' + +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID. | +| `itemId` | *string* | :heavy_check_mark: | The item ID to resolve. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 + +**[?Operations\ResolveQueueItemResponse](../../Models/Operations/ResolveQueueItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\PermissionDeniedError | 403 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + +## resolveMany + +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 + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + use ModerationApi; use ModerationApi\Models\Operations; @@ -88,13 +145,15 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$body = new Operations\ResolveQueueItemRequestBody( - comment: 'Reviewed: no violation.', +$body = new Operations\ResolveQueueItemsRequestBody( + itemIds: [ + 'clx8k2v0e000108l4a9bz3f7q', + 'clx8k2v0e000208l4h2mc6d1r', + ], ); -$response = $sdk->queue->items->resolve( +$response = $sdk->queue->items->resolveMany( id: '', - itemId: '', body: $body ); @@ -106,16 +165,15 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `itemId` | *string* | :heavy_check_mark: | The item ID to resolve | -| `body` | [Operations\ResolveQueueItemRequestBody](../../Models/Operations/ResolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID. | +| `body` | [Operations\ResolveQueueItemsRequestBody](../../Models/Operations/ResolveQueueItemsRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?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 -**[?Operations\ResolveQueueItemResponse](../../Models/Operations/ResolveQueueItemResponse.md)** +**[?Operations\ResolveQueueItemsResponse](../../Models/Operations/ResolveQueueItemsResponse.md)** ### Errors @@ -130,7 +188,7 @@ if ($response->object !== null) { ## 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 @@ -141,7 +199,6 @@ declare(strict_types=1); require 'vendor/autoload.php'; use ModerationApi; -use ModerationApi\Models\Operations; $sdk = ModerationApi\ModerationApi::builder() ->setSecurity( @@ -149,14 +206,11 @@ $sdk = ModerationApi\ModerationApi::builder() ) ->build(); -$body = new Operations\UnresolveQueueItemRequestBody( - comment: 'Reopened after an appeal.', -); + $response = $sdk->queue->items->unresolve( id: '', - itemId: '', - body: $body + itemId: '' ); @@ -167,12 +221,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `itemId` | *string* | :heavy_check_mark: | The item ID to unresolve | -| `body` | [Operations\UnresolveQueueItemRequestBody](../../Models/Operations/UnresolveQueueItemRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID. | +| `itemId` | *string* | :heavy_check_mark: | The item ID to unresolve. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 7c5bb09..5fae9f5 100644 --- a/docs/sdks/queue/README.md +++ b/docs/sdks/queue/README.md @@ -4,12 +4,73 @@ ### Available Operations +* [list](#list) - List queues * [retrieve](#retrieve) - Get a queue * [getStats](#getstats) - 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 + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use ModerationApi; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + + + +$responses = $sdk->queue->list( + page: 1, + pageSize: 20 + +); + + +foreach ($responses as $response) { + if ($response->statusCode === 200) { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 + +**[?Operations\ListQueuesResponse](../../Models/Operations/ListQueuesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\PermissionDeniedError | 403 | application/json | +| Errors\NotFoundError | 404 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Errors\APIException | 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 @@ -40,10 +101,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID. | +| `projectId` | *?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 @@ -63,7 +124,7 @@ if ($response->object !== null) { ## getStats -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 @@ -96,11 +157,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The queue ID | -| `withinDays` | *?int* | :heavy_minus_sign: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The queue ID. | +| `withinDays` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 3d5f5ea..fdd8042 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -48,11 +48,11 @@ foreach ($responses as $response) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -107,10 +107,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `body` | [Operations\CreateWebhookRequestBody](../../Models/Operations/CreateWebhookRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\CreateWebhookRequestBody](../../Models/Operations/CreateWebhookRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -158,10 +158,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to get. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to get. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -212,11 +212,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to update. | -| `body` | [Operations\UpdateWebhookRequestBody](../../Models/Operations/UpdateWebhookRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to update. | +| `body` | [Operations\UpdateWebhookRequestBody](../../Models/Operations/UpdateWebhookRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -265,10 +265,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the webhook to delete. | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the webhook to delete. | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 db83ff2..e061501 100644 --- a/docs/sdks/webhooksecret/README.md +++ b/docs/sdks/webhooksecret/README.md @@ -39,9 +39,9 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `projectId` | *?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 81e2725..6a051db 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 * [getEmbeddingStatus](#getembeddingstatus) - Get embedding status @@ -47,11 +48,11 @@ foreach ($responses as $response) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page` | *?int* | :heavy_minus_sign: | N/A | -| `pageSize` | *?int* | :heavy_minus_sign: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *?int* | :heavy_minus_sign: | N/A | +| `pageSize` | *?int* | :heavy_minus_sign: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -69,6 +70,60 @@ foreach ($responses as $response) { | Errors\InternalServerError | 500 | application/json | | Errors\APIException | 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 + + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use ModerationApi; +use ModerationApi\Models\Operations; + +$sdk = ModerationApi\ModerationApi::builder() + ->setSecurity( + '' + ) + ->build(); + +$body = new Operations\CreateWordlistRequestBody( + name: '', +); + +$response = $sdk->wordlist->create( + body: $body +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `body` | [Operations\CreateWordlistRequestBody](../../Models/Operations/CreateWordlistRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?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 + +**[?Operations\CreateWordlistResponse](../../Models/Operations/CreateWordlistResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| Errors\BadRequestError | 400 | application/json | +| Errors\AuthenticationError | 401 | application/json | +| Errors\RateLimitError | 429 | application/json | +| Errors\APIException | 4XX, 5XX | \*/\* | + ## retrieve Get a specific wordlist by ID @@ -102,10 +157,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to get | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to get | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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,7 +180,7 @@ if ($response->object !== null) { ## 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 @@ -159,11 +214,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to update | -| `body` | [Operations\UpdateWordlistRequestBody](../../Models/Operations/UpdateWordlistRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to update | +| `body` | [Operations\UpdateWordlistRequestBody](../../Models/Operations/UpdateWordlistRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -212,10 +267,10 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to check embedding status for | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to check embedding status for | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 276fae5..6ee7f42 100644 --- a/docs/sdks/words/README.md +++ b/docs/sdks/words/README.md @@ -48,11 +48,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to add words to | -| `body` | [Operations\AddWordlistWordsRequestBody](../../Models/Operations/AddWordlistWordsRequestBody.md) | :heavy_check_mark: | N/A | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to add words to | +| `body` | [Operations\AddWordlistWordsRequestBody](../../Models/Operations/AddWordlistWordsRequestBody.md) | :heavy_check_mark: | N/A | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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 @@ -107,11 +107,11 @@ if ($response->object !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of the wordlist to remove words from | -| `words` | array<*string*> | :heavy_check_mark: | Array of words to remove from the wordlist | -| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of the wordlist to remove words from | +| `words` | array<*string*> | :heavy_check_mark: | Array of words to remove from the wordlist | +| `projectId` | *?string* | :heavy_minus_sign: | The project to act on, by ID or name. Required with an organization key unless the key reaches only one 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/src/Analytics.php b/src/Analytics.php new file mode 100644 index 0000000..ae9053a --- /dev/null +++ b/src/Analytics.php @@ -0,0 +1,937 @@ +sdkConfiguration = $sdkConfig; + } + /** + * @param string $baseUrl + * @param array $urlVariables + * + * @return string + */ + public function getUrl(string $baseUrl, array $urlVariables): string + { + $serverDetails = $this->sdkConfiguration->getServerDetails(); + + if ($baseUrl == null) { + $baseUrl = $serverDetails->baseUrl; + } + + if ($urlVariables == null) { + $urlVariables = $serverDetails->options; + } + + return Utils\Utils::templateUrl($baseUrl, $urlVariables); + } + + /** + * Get the most flagged authors + * + * Get the authors with the most flagged content in a time window, largest first. + * + * @param ?\ModerationApi\Models\Operations\GetAnalyticsAuthorsQueryParamRange $range + * @param ?string $channel + * @param ?int $limit + * @param ?string $projectId + * @return \ModerationApi\Models\Operations\GetAnalyticsAuthorsResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + public function authors(?Operations\GetAnalyticsAuthorsQueryParamRange $range = null, ?string $channel = null, ?int $limit = null, ?string $projectId = null, ?Options $options = null): Operations\GetAnalyticsAuthorsResponse + { + $request = new Operations\GetAnalyticsAuthorsRequest( + range: $range, + channel: $channel, + limit: $limit, + projectId: $projectId, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/analytics/authors'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\GetAnalyticsAuthorsRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'getAnalyticsAuthors', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\GetAnalyticsAuthorsResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetAnalyticsAuthorsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\PermissionDeniedError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\NotFoundError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * 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. + * + * @param ?\ModerationApi\Models\Operations\GetAnalyticsAutomationQueryParamRange $range + * @param ?string $channel + * @param ?string $projectId + * @return \ModerationApi\Models\Operations\GetAnalyticsAutomationResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + public function automation(?Operations\GetAnalyticsAutomationQueryParamRange $range = null, ?string $channel = null, ?string $projectId = null, ?Options $options = null): Operations\GetAnalyticsAutomationResponse + { + $request = new Operations\GetAnalyticsAutomationRequest( + range: $range, + channel: $channel, + projectId: $projectId, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/analytics/automation'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\GetAnalyticsAutomationRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'getAnalyticsAutomation', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\GetAnalyticsAutomationResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetAnalyticsAutomationResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\PermissionDeniedError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\NotFoundError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Get analytics per channel + * + * Get requests, flags and flag rate for each channel of the project in a time window. + * + * @param ?\ModerationApi\Models\Operations\GetAnalyticsChannelsQueryParamRange $range + * @param ?string $projectId + * @return \ModerationApi\Models\Operations\GetAnalyticsChannelsResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + public function channels(?Operations\GetAnalyticsChannelsQueryParamRange $range = null, ?string $projectId = null, ?Options $options = null): Operations\GetAnalyticsChannelsResponse + { + $request = new Operations\GetAnalyticsChannelsRequest( + range: $range, + projectId: $projectId, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/analytics/channels'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\GetAnalyticsChannelsRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'getAnalyticsChannels', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\GetAnalyticsChannelsResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetAnalyticsChannelsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\PermissionDeniedError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\NotFoundError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * 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. + * + * @param ?\ModerationApi\Models\Operations\GetAnalyticsPoliciesQueryParamRange $range + * @param ?string $channel + * @param ?int $limit + * @param ?string $projectId + * @return \ModerationApi\Models\Operations\GetAnalyticsPoliciesResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + public function policies(?Operations\GetAnalyticsPoliciesQueryParamRange $range = null, ?string $channel = null, ?int $limit = null, ?string $projectId = null, ?Options $options = null): Operations\GetAnalyticsPoliciesResponse + { + $request = new Operations\GetAnalyticsPoliciesRequest( + range: $range, + channel: $channel, + limit: $limit, + projectId: $projectId, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/analytics/policies'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\GetAnalyticsPoliciesRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'getAnalyticsPolicies', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\GetAnalyticsPoliciesResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetAnalyticsPoliciesResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\PermissionDeniedError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\NotFoundError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * 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. + * + * @param ?\ModerationApi\Models\Operations\GetAnalyticsSummaryQueryParamRange $range + * @param ?string $channel + * @param ?string $projectId + * @return \ModerationApi\Models\Operations\GetAnalyticsSummaryResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + public function summary(?Operations\GetAnalyticsSummaryQueryParamRange $range = null, ?string $channel = null, ?string $projectId = null, ?Options $options = null): Operations\GetAnalyticsSummaryResponse + { + $request = new Operations\GetAnalyticsSummaryRequest( + range: $range, + channel: $channel, + projectId: $projectId, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/analytics/summary'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\GetAnalyticsSummaryRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'getAnalyticsSummary', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\GetAnalyticsSummaryResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetAnalyticsSummaryResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\PermissionDeniedError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\NotFoundError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Get volumes over time + * + * Get requests, flags, rejections and reviews per hour (24h) or per day (7d, 30d, 90d), oldest first. + * + * @param ?\ModerationApi\Models\Operations\GetAnalyticsVolumesQueryParamRange $range + * @param ?string $channel + * @param ?string $projectId + * @return \ModerationApi\Models\Operations\GetAnalyticsVolumesResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + public function volumes(?Operations\GetAnalyticsVolumesQueryParamRange $range = null, ?string $channel = null, ?string $projectId = null, ?Options $options = null): Operations\GetAnalyticsVolumesResponse + { + $request = new Operations\GetAnalyticsVolumesRequest( + range: $range, + channel: $channel, + projectId: $projectId, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/analytics/volumes'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\GetAnalyticsVolumesRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'getAnalyticsVolumes', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\GetAnalyticsVolumesResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetAnalyticsVolumesResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\PermissionDeniedError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\NotFoundError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/ApiKeys.php b/src/ApiKeys.php new file mode 100644 index 0000000..4f2f22c --- /dev/null +++ b/src/ApiKeys.php @@ -0,0 +1,179 @@ +sdkConfiguration = $sdkConfig; + } + /** + * @param string $baseUrl + * @param array $urlVariables + * + * @return string + */ + public function getUrl(string $baseUrl, array $urlVariables): string + { + $serverDetails = $this->sdkConfiguration->getServerDetails(); + + if ($baseUrl == null) { + $baseUrl = $serverDetails->baseUrl; + } + + if ($urlVariables == null) { + $urlVariables = $serverDetails->options; + } + + return Utils\Utils::templateUrl($baseUrl, $urlVariables); + } + + /** + * Create a project API key + * + * Create a new secret API key for a project and return it. Give each app or computer its own key, so you can revoke one without breaking the others. The project's existing keys keep working. Needs the `projects:write` permission. + * + * @param \ModerationApi\Models\Operations\CreateProjectApiKeyRequestBody $body + * @param string $id + * @return \ModerationApi\Models\Operations\CreateProjectApiKeyResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + public function create(Operations\CreateProjectApiKeyRequestBody $body, string $id, ?Options $options = null): Operations\CreateProjectApiKeyResponse + { + $request = new Operations\CreateProjectApiKeyRequest( + id: $id, + body: $body, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/projects/{id}/api-keys', Operations\CreateProjectApiKeyRequest::class, $request); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'body', 'json'); + if ($body === null) { + throw new \Exception('Request body is required'); + } + $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'createProjectApiKey', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Components\ProjectApiKey', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreateProjectApiKeyResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + projectApiKey: $obj); + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\PermissionDeniedError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\NotFoundError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/Authors.php b/src/Authors.php index 42c64dd..a832e64 100644 --- a/src/Authors.php +++ b/src/Authors.php @@ -469,7 +469,7 @@ public function retrieve(string $id, ?string $projectId = null, ?Options $option /** * 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. * * @param ?\ModerationApi\Models\Operations\ListAuthorsRequest $request * @return \ModerationApi\Models\Operations\ListAuthorsResponse @@ -556,7 +556,6 @@ private function listIndividual(?Operations\ListAuthorsRequest $request = null, sortDirection: $request != null ? $request->sortDirection : null, memberSinceDate: $request != null ? $request->memberSinceDate : null, lastActiveDate: $request != null ? $request->lastActiveDate : null, - contentTypes: $request != null ? $request->contentTypes : null, projectId: $request != null ? $request->projectId : null, ), ); @@ -650,7 +649,7 @@ private function listIndividual(?Operations\ListAuthorsRequest $request = null, /** * 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. * * @param ?\ModerationApi\Models\Operations\ListAuthorsRequest $request * @return \Generator<\ModerationApi\Models\Operations\ListAuthorsResponse> diff --git a/src/Feedback.php b/src/Feedback.php new file mode 100644 index 0000000..5fb980d --- /dev/null +++ b/src/Feedback.php @@ -0,0 +1,159 @@ +sdkConfiguration = $sdkConfig; + } + /** + * @param string $baseUrl + * @param array $urlVariables + * + * @return string + */ + public function getUrl(string $baseUrl, array $urlVariables): string + { + $serverDetails = $this->sdkConfiguration->getServerDetails(); + + if ($baseUrl == null) { + $baseUrl = $serverDetails->baseUrl; + } + + if ($urlVariables == null) { + $urlVariables = $serverDetails->options; + } + + return Utils\Utils::templateUrl($baseUrl, $urlVariables); + } + + /** + * 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. + * + * @param \ModerationApi\Models\Operations\CreateFeedbackRequestBody $body + * @param ?string $projectId + * @return \ModerationApi\Models\Operations\CreateFeedbackResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + public function create(Operations\CreateFeedbackRequestBody $body, ?string $projectId = null, ?Options $options = null): Operations\CreateFeedbackResponse + { + $request = new Operations\CreateFeedbackRequest( + body: $body, + projectId: $projectId, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/feedback'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'body', 'json'); + if ($body === null) { + throw new \Exception('Request body is required'); + } + $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'createFeedback', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\CreateFeedbackResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreateFeedbackResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/Items.php b/src/Items.php index 05995e3..9ef4ddd 100644 --- a/src/Items.php +++ b/src/Items.php @@ -45,9 +45,9 @@ public function getUrl(string $baseUrl, array $urlVariables): string } /** - * Get queue items + * List queue items * - * 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. * * @param \ModerationApi\Models\Operations\ListQueueItemsRequest $request * @return \ModerationApi\Models\Operations\ListQueueItemsResponse @@ -131,15 +131,14 @@ private function listIndividual(Operations\ListQueueItemsRequest $request, ?Opti id: $request != null ? $request->id : '', page: $nextPage, pageSize: $request != null ? $request->pageSize : null, - sortField: $request != null ? $request->sortField : null, - sortDirection: $request != null ? $request->sortDirection : null, + sort: $request != null ? $request->sort : null, + includeResolved: $request != null ? $request->includeResolved : null, conversationIds: $request != null ? $request->conversationIds : null, labels: $request != null ? $request->labels : null, - afterDate: $request != null ? $request->afterDate : null, - beforeDate: $request != null ? $request->beforeDate : null, - includeResolved: $request != null ? $request->includeResolved : null, authorId: $request != null ? $request->authorId : null, filteredActionIds: $request != null ? $request->filteredActionIds : null, + afterDate: $request != null ? $request->afterDate : null, + beforeDate: $request != null ? $request->beforeDate : null, projectId: $request != null ? $request->projectId : null, ), ); @@ -231,9 +230,9 @@ private function listIndividual(Operations\ListQueueItemsRequest $request, ?Opti } } /** - * Get queue items + * List queue items * - * 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. * * @param \ModerationApi\Models\Operations\ListQueueItemsRequest $request * @return \Generator<\ModerationApi\Models\Operations\ListQueueItemsResponse> @@ -251,27 +250,158 @@ public function list(Operations\ListQueueItemsRequest $request, ?Options $option /** * 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`. * - * @param \ModerationApi\Models\Operations\ResolveQueueItemRequestBody $body * @param string $id * @param string $itemId * @param ?string $projectId * @return \ModerationApi\Models\Operations\ResolveQueueItemResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function resolve(Operations\ResolveQueueItemRequestBody $body, string $id, string $itemId, ?string $projectId = null, ?Options $options = null): Operations\ResolveQueueItemResponse + public function resolve(string $id, string $itemId, ?string $projectId = null, ?Options $options = null): Operations\ResolveQueueItemResponse { $request = new Operations\ResolveQueueItemRequest( id: $id, itemId: $itemId, - body: $body, projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/queue/{id}/items/{itemId}/resolve', Operations\ResolveQueueItemRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'resolveQueueItem', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\ResolveQueueItemResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\ResolveQueueItemResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\PermissionDeniedError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * 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`. + * + * @param \ModerationApi\Models\Operations\ResolveQueueItemsRequestBody $body + * @param string $id + * @param ?string $projectId + * @return \ModerationApi\Models\Operations\ResolveQueueItemsResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + public function resolveMany(Operations\ResolveQueueItemsRequestBody $body, string $id, ?string $projectId = null, ?Options $options = null): Operations\ResolveQueueItemsResponse + { + $request = new Operations\ResolveQueueItemsRequest( + id: $id, + body: $body, + projectId: $projectId, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/queue/{id}/items/resolve', Operations\ResolveQueueItemsRequest::class, $request); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; $body = Utils\Utils::serializeRequestBody($request, 'body', 'json'); if ($body === null) { throw new \Exception('Request body is required'); @@ -284,7 +414,7 @@ public function resolve(Operations\ResolveQueueItemRequestBody $body, string $id $httpOptions['headers']['Accept'] = 'application/json'; $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); - $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'resolveQueueItem', null, $this->sdkConfiguration->securitySource); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'resolveQueueItems', null, $this->sdkConfiguration->securitySource); $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); $httpRequest = Utils\Utils::removeHeaders($httpRequest); @@ -308,8 +438,8 @@ public function resolve(Operations\ResolveQueueItemRequestBody $body, string $id $serializer = Utils\JSON::createSerializer(); $responseData = (string) $httpResponse->getBody(); - $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\ResolveQueueItemResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\ResolveQueueItemResponse( + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\ResolveQueueItemsResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\ResolveQueueItemsResponse( statusCode: $statusCode, contentType: $contentType, rawResponse: $httpResponse, @@ -391,32 +521,25 @@ public function resolve(Operations\ResolveQueueItemRequestBody $body, string $id /** * 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. * - * @param \ModerationApi\Models\Operations\UnresolveQueueItemRequestBody $body * @param string $id * @param string $itemId * @param ?string $projectId * @return \ModerationApi\Models\Operations\UnresolveQueueItemResponse * @throws \ModerationApi\Models\Errors\APIException */ - public function unresolve(Operations\UnresolveQueueItemRequestBody $body, string $id, string $itemId, ?string $projectId = null, ?Options $options = null): Operations\UnresolveQueueItemResponse + public function unresolve(string $id, string $itemId, ?string $projectId = null, ?Options $options = null): Operations\UnresolveQueueItemResponse { $request = new Operations\UnresolveQueueItemRequest( id: $id, itemId: $itemId, - body: $body, projectId: $projectId, ); $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/queue/{id}/items/{itemId}/unresolve', Operations\UnresolveQueueItemRequest::class, $request); $urlOverride = null; $httpOptions = ['http_errors' => false]; - $body = Utils\Utils::serializeRequestBody($request, 'body', 'json'); - if ($body === null) { - throw new \Exception('Request body is required'); - } - $httpOptions = array_merge_recursive($httpOptions, $body); $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); if (! array_key_exists('headers', $httpOptions)) { $httpOptions['headers'] = []; diff --git a/src/Models/Components/BadRequestErrorCode.php b/src/Models/Components/BadRequestErrorCode.php index 1d45d13..73a128d 100644 --- a/src/Models/Components/BadRequestErrorCode.php +++ b/src/Models/Components/BadRequestErrorCode.php @@ -14,12 +14,14 @@ * * * - `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`. */ enum BadRequestErrorCode: string { case InvalidRequest = 'invalid_request'; case ProjectIdRequired = 'project_id_required'; + case ProjectNameAmbiguous = 'project_name_ambiguous'; case ValidationFailed = 'validation_failed'; } diff --git a/src/Models/Components/Label.php b/src/Models/Components/Label.php new file mode 100644 index 0000000..35b96fd --- /dev/null +++ b/src/Models/Components/Label.php @@ -0,0 +1,85 @@ + $matches + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('matches')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Components\QueueItemMatch>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $matches = null; + + /** + * @param string $label + * @param float $score + * @param ?bool $manual + * @param ?bool $flagged + * @param ?bool $shadowFlagged + * @param ?array<\ModerationApi\Models\Components\QueueItemMatch> $matches + * @phpstan-pure + */ + public function __construct(string $label, float $score, ?bool $manual = null, ?bool $flagged = null, ?bool $shadowFlagged = null, ?array $matches = null) + { + $this->label = $label; + $this->score = $score; + $this->manual = $manual; + $this->flagged = $flagged; + $this->shadowFlagged = $shadowFlagged; + $this->matches = $matches; + } +} \ No newline at end of file diff --git a/src/Models/Components/NotFoundErrorCode.php b/src/Models/Components/NotFoundErrorCode.php index 97ee1db..581f632 100644 --- a/src/Models/Components/NotFoundErrorCode.php +++ b/src/Models/Components/NotFoundErrorCode.php @@ -17,6 +17,7 @@ * - `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. @@ -28,6 +29,7 @@ enum NotFoundErrorCode: string case ActionNotFound = 'action_not_found'; case AuthorNotFound = 'author_not_found'; case QueueNotFound = 'queue_not_found'; + case QueueItemNotFound = 'queue_item_not_found'; case WordlistNotFound = 'wordlist_not_found'; case WebhookNotFound = 'webhook_not_found'; case ProjectNotFound = 'project_not_found'; diff --git a/src/Models/Components/ProjectApiKey.php b/src/Models/Components/ProjectApiKey.php new file mode 100644 index 0000000..2efec44 --- /dev/null +++ b/src/Models/Components/ProjectApiKey.php @@ -0,0 +1,70 @@ +id = $id; + $this->name = $name; + $this->projectId = $projectId; + $this->createdAt = $createdAt; + $this->secretKey = $secretKey; + } +} \ No newline at end of file diff --git a/src/Models/Components/PublicAuthor.php b/src/Models/Components/PublicAuthor.php index 8a4758b..5b1968d 100644 --- a/src/Models/Components/PublicAuthor.php +++ b/src/Models/Components/PublicAuthor.php @@ -38,11 +38,11 @@ class PublicAuthor /** * Current author status * - * @var \ModerationApi\Models\Components\Status $status + * @var \ModerationApi\Models\Components\PublicAuthorStatus $status */ #[\Speakeasy\Serializer\Annotation\SerializedName('status')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Components\Status')] - public Status $status; + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Components\PublicAuthorStatus')] + public PublicAuthorStatus $status; /** * @@ -154,7 +154,7 @@ class PublicAuthor * @param string $id * @param float $firstSeen * @param float $lastSeen - * @param \ModerationApi\Models\Components\Status $status + * @param \ModerationApi\Models\Components\PublicAuthorStatus $status * @param \ModerationApi\Models\Components\TrustLevel $trustLevel * @param \ModerationApi\Models\Components\Metrics $metrics * @param \ModerationApi\Models\Components\Metadata $metadata @@ -169,7 +169,7 @@ class PublicAuthor * @param ?float $lastIncident * @phpstan-pure */ - public function __construct(string $id, float $firstSeen, float $lastSeen, Status $status, TrustLevel $trustLevel, Metrics $metrics, Metadata $metadata, ?Block $block = null, ?RiskEvaluation $riskEvaluation = null, ?string $externalId = null, ?string $profilePicture = null, ?string $externalLink = null, ?string $name = null, ?string $email = null, ?string $company = null, ?float $lastIncident = null) + public function __construct(string $id, float $firstSeen, float $lastSeen, PublicAuthorStatus $status, TrustLevel $trustLevel, Metrics $metrics, Metadata $metadata, ?Block $block = null, ?RiskEvaluation $riskEvaluation = null, ?string $externalId = null, ?string $profilePicture = null, ?string $externalLink = null, ?string $name = null, ?string $email = null, ?string $company = null, ?float $lastIncident = null) { $this->id = $id; $this->firstSeen = $firstSeen; diff --git a/src/Models/Components/Status.php b/src/Models/Components/PublicAuthorStatus.php similarity index 89% rename from src/Models/Components/Status.php rename to src/Models/Components/PublicAuthorStatus.php index f70a4c0..ca696b8 100644 --- a/src/Models/Components/Status.php +++ b/src/Models/Components/PublicAuthorStatus.php @@ -10,7 +10,7 @@ /** Current author status */ -enum Status: string +enum PublicAuthorStatus: string { case Enabled = 'enabled'; case Suspended = 'suspended'; diff --git a/src/Models/Components/Queue.php b/src/Models/Components/Queue.php new file mode 100644 index 0000000..4ef5720 --- /dev/null +++ b/src/Models/Components/Queue.php @@ -0,0 +1,60 @@ +id = $id; + $this->name = $name; + $this->isDefault = $isDefault; + $this->description = $description; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItem.php b/src/Models/Components/QueueItem.php new file mode 100644 index 0000000..bc1f4ee --- /dev/null +++ b/src/Models/Components/QueueItem.php @@ -0,0 +1,144 @@ + $labels + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('labels')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Components\Label>')] + public array $labels; + + /** + * Whether moderation flagged the content. + * + * @var bool $flagged + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('flagged')] + public bool $flagged; + + /** + * `pending` waits for review. `resolved` is reviewed. + * + * @var \ModerationApi\Models\Components\QueueItemStatus $status + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('status')] + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Components\QueueItemStatus')] + public QueueItemStatus $status; + + /** + * When the content was submitted, as Unix time in milliseconds. + * + * @var float $timestamp + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('timestamp')] + public float $timestamp; + + /** + * The submitted content. + * + * @var \ModerationApi\Models\Components\QueueItemText|\ModerationApi\Models\Components\QueueItemImage|\ModerationApi\Models\Components\QueueItemVideo|\ModerationApi\Models\Components\QueueItemAudio|\ModerationApi\Models\Components\QueueItemObject|null $content + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('content')] + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Components\QueueItemText|\ModerationApi\Models\Components\QueueItemImage|\ModerationApi\Models\Components\QueueItemVideo|\ModerationApi\Models\Components\QueueItemAudio|\ModerationApi\Models\Components\QueueItemObject|null')] + #[\Speakeasy\Serializer\Annotation\UnionDiscriminator(field: 'type', map: ['text' => '\ModerationApi\Models\Components\QueueItemText', 'image' => '\ModerationApi\Models\Components\QueueItemImage', 'video' => '\ModerationApi\Models\Components\QueueItemVideo', 'audio' => '\ModerationApi\Models\Components\QueueItemAudio', 'object' => '\ModerationApi\Models\Components\QueueItemObject'])] + public QueueItemText|QueueItemImage|QueueItemVideo|QueueItemAudio|QueueItemObject|null $content; + + /** + * Severity score from 0 to 1, if available. + * + * @var ?float $severity + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('severity')] + public ?float $severity; + + /** + * Detected ISO language code. + * + * @var ?string $language + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('language')] + public ?string $language; + + /** + * Conversation ID, if any. + * + * @var ?string $conversationId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('conversationId')] + public ?string $conversationId; + + /** + * Your author ID, if any. + * + * @var ?string $authorId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('authorId')] + public ?string $authorId; + + /** + * Content type, for example `message` or `profile`. + * + * @var ?string $contentType + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('contentType')] + public ?string $contentType; + + /** + * @param string $id + * @param string $contentId + * @param array<\ModerationApi\Models\Components\Label> $labels + * @param bool $flagged + * @param \ModerationApi\Models\Components\QueueItemStatus $status + * @param float $timestamp + * @param \ModerationApi\Models\Components\QueueItemText|\ModerationApi\Models\Components\QueueItemImage|\ModerationApi\Models\Components\QueueItemVideo|\ModerationApi\Models\Components\QueueItemAudio|\ModerationApi\Models\Components\QueueItemObject|null $content + * @param ?float $severity + * @param ?string $language + * @param ?string $conversationId + * @param ?string $authorId + * @param ?string $contentType + * @phpstan-pure + */ + public function __construct(string $id, string $contentId, array $labels, bool $flagged, QueueItemStatus $status, float $timestamp, QueueItemText|QueueItemImage|QueueItemVideo|QueueItemAudio|QueueItemObject|null $content = null, ?float $severity = null, ?string $language = null, ?string $conversationId = null, ?string $authorId = null, ?string $contentType = null) + { + $this->id = $id; + $this->contentId = $contentId; + $this->labels = $labels; + $this->flagged = $flagged; + $this->status = $status; + $this->timestamp = $timestamp; + $this->content = $content; + $this->severity = $severity; + $this->language = $language; + $this->conversationId = $conversationId; + $this->authorId = $authorId; + $this->contentType = $contentType; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemAudio.php b/src/Models/Components/QueueItemAudio.php new file mode 100644 index 0000000..c34c9da --- /dev/null +++ b/src/Models/Components/QueueItemAudio.php @@ -0,0 +1,40 @@ +url = $url; + $this->type = $type; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemBrandImpersonation.php b/src/Models/Components/QueueItemBrandImpersonation.php new file mode 100644 index 0000000..8221b9f --- /dev/null +++ b/src/Models/Components/QueueItemBrandImpersonation.php @@ -0,0 +1,38 @@ +brand = $brand; + $this->method = $method; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemContentLeafAudio.php b/src/Models/Components/QueueItemContentLeafAudio.php new file mode 100644 index 0000000..7ac82bd --- /dev/null +++ b/src/Models/Components/QueueItemContentLeafAudio.php @@ -0,0 +1,40 @@ +url = $url; + $this->type = $type; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemContentLeafImage.php b/src/Models/Components/QueueItemContentLeafImage.php new file mode 100644 index 0000000..3f5da66 --- /dev/null +++ b/src/Models/Components/QueueItemContentLeafImage.php @@ -0,0 +1,52 @@ +url = $url; + $this->data = $data; + $this->type = $type; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemContentLeafText.php b/src/Models/Components/QueueItemContentLeafText.php new file mode 100644 index 0000000..0f731ff --- /dev/null +++ b/src/Models/Components/QueueItemContentLeafText.php @@ -0,0 +1,40 @@ +text = $text; + $this->type = $type; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemContentLeafVideo.php b/src/Models/Components/QueueItemContentLeafVideo.php new file mode 100644 index 0000000..cc03b22 --- /dev/null +++ b/src/Models/Components/QueueItemContentLeafVideo.php @@ -0,0 +1,40 @@ +url = $url; + $this->type = $type; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemImage.php b/src/Models/Components/QueueItemImage.php new file mode 100644 index 0000000..3229b1f --- /dev/null +++ b/src/Models/Components/QueueItemImage.php @@ -0,0 +1,52 @@ +url = $url; + $this->data = $data; + $this->type = $type; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemMatch.php b/src/Models/Components/QueueItemMatch.php new file mode 100644 index 0000000..2364645 --- /dev/null +++ b/src/Models/Components/QueueItemMatch.php @@ -0,0 +1,116 @@ + $span + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('span')] + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $span; + + /** + * $reasons + * + * @var ?array $reasons + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('reasons')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $reasons = null; + + /** + * + * @var ?\ModerationApi\Models\Components\QueueItemSignals $signals + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('signals')] + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Components\QueueItemSignals|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?QueueItemSignals $signals = null; + + /** + * + * @var ?string $entityType + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('entity_type')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $entityType = null; + + /** + * $scripts + * + * @var ?array $scripts + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('scripts')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $scripts = null; + + /** + * + * @var ?string $skeleton + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('skeleton')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $skeleton = null; + + /** + * + * @var ?string $mask + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('mask')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $mask = null; + + /** + * @param string $match + * @param float $probability + * @param array $span + * @param ?array $reasons + * @param ?\ModerationApi\Models\Components\QueueItemSignals $signals + * @param ?string $entityType + * @param ?array $scripts + * @param ?string $skeleton + * @param ?string $mask + * @phpstan-pure + */ + public function __construct(string $match, float $probability, array $span, ?array $reasons = null, ?QueueItemSignals $signals = null, ?string $entityType = null, ?array $scripts = null, ?string $skeleton = null, ?string $mask = null) + { + $this->match = $match; + $this->probability = $probability; + $this->span = $span; + $this->reasons = $reasons; + $this->signals = $signals; + $this->entityType = $entityType; + $this->scripts = $scripts; + $this->skeleton = $skeleton; + $this->mask = $mask; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemObject.php b/src/Models/Components/QueueItemObject.php new file mode 100644 index 0000000..08fb9f2 --- /dev/null +++ b/src/Models/Components/QueueItemObject.php @@ -0,0 +1,41 @@ + $data + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('data')] + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $data; + + /** + * + * @var string $type + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('type')] + public string $type; + + /** + * @param string $type + * @param array $data + * @phpstan-pure + */ + public function __construct(array $data, string $type = 'object') + { + $this->data = $data; + $this->type = $type; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemSignals.php b/src/Models/Components/QueueItemSignals.php new file mode 100644 index 0000000..a3ab705 --- /dev/null +++ b/src/Models/Components/QueueItemSignals.php @@ -0,0 +1,102 @@ +hasSuspiciousCharacters = $hasSuspiciousCharacters; + $this->isLinkShortener = $isLinkShortener; + $this->isReported = $isReported; + $this->brandImpersonation = $brandImpersonation; + $this->domainAgeDays = $domainAgeDays; + $this->hasEmailSetup = $hasEmailSetup; + $this->redirectCount = $redirectCount; + $this->finalUrl = $finalUrl; + $this->botProtection = $botProtection; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemStatus.php b/src/Models/Components/QueueItemStatus.php new file mode 100644 index 0000000..430ca6f --- /dev/null +++ b/src/Models/Components/QueueItemStatus.php @@ -0,0 +1,17 @@ +text = $text; + $this->type = $type; + } +} \ No newline at end of file diff --git a/src/Models/Components/QueueItemVideo.php b/src/Models/Components/QueueItemVideo.php new file mode 100644 index 0000000..5c61210 --- /dev/null +++ b/src/Models/Components/QueueItemVideo.php @@ -0,0 +1,40 @@ +url = $url; + $this->type = $type; + } +} \ No newline at end of file diff --git a/src/Models/Operations/Queue.php b/src/Models/Components/QueueWithCounts.php similarity index 50% rename from src/Models/Operations/Queue.php rename to src/Models/Components/QueueWithCounts.php index 9e69c25..c67dfd4 100644 --- a/src/Models/Operations/Queue.php +++ b/src/Models/Components/QueueWithCounts.php @@ -6,12 +6,13 @@ declare(strict_types=1); -namespace ModerationApi\Models\Operations; +namespace ModerationApi\Models\Components; -class Queue +class QueueWithCounts { /** + * The queue ID. * * @var string $id */ @@ -19,6 +20,7 @@ class Queue public string $id; /** + * The queue name. * * @var string $name */ @@ -26,59 +28,63 @@ class Queue public string $name; /** + * Whether this is the default queue of the project. * - * @var string $description + * @var bool $isDefault */ - #[\Speakeasy\Serializer\Annotation\SerializedName('description')] - public string $description; + #[\Speakeasy\Serializer\Annotation\SerializedName('isDefault')] + public bool $isDefault; /** + * Number of items that wait for review. * - * @var \ModerationApi\Models\Operations\Filter $filter + * @var int $unresolvedItemsCount */ - #[\Speakeasy\Serializer\Annotation\SerializedName('filter')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\Filter')] - public Filter $filter; + #[\Speakeasy\Serializer\Annotation\SerializedName('unresolvedItemsCount')] + public int $unresolvedItemsCount; /** + * Number of items that are resolved. * - * @var float $unresolvedItemsCount + * @var int $resolvedItemsCount */ - #[\Speakeasy\Serializer\Annotation\SerializedName('unresolvedItemsCount')] - public float $unresolvedItemsCount; + #[\Speakeasy\Serializer\Annotation\SerializedName('resolvedItemsCount')] + public int $resolvedItemsCount; /** + * Number of items in the queue, resolved and unresolved. * - * @var float $resolvedItemsCount + * @var int $totalItemsCount */ - #[\Speakeasy\Serializer\Annotation\SerializedName('resolvedItemsCount')] - public float $resolvedItemsCount; + #[\Speakeasy\Serializer\Annotation\SerializedName('totalItemsCount')] + public int $totalItemsCount; /** + * The queue description. * - * @var float $totalItemsCount + * @var ?string $description */ - #[\Speakeasy\Serializer\Annotation\SerializedName('totalItemsCount')] - public float $totalItemsCount; + #[\Speakeasy\Serializer\Annotation\SerializedName('description')] + public ?string $description; /** * @param string $id * @param string $name - * @param string $description - * @param \ModerationApi\Models\Operations\Filter $filter - * @param float $unresolvedItemsCount - * @param float $resolvedItemsCount - * @param float $totalItemsCount + * @param bool $isDefault + * @param int $unresolvedItemsCount + * @param int $resolvedItemsCount + * @param int $totalItemsCount + * @param ?string $description * @phpstan-pure */ - public function __construct(string $id, string $name, string $description, Filter $filter, float $unresolvedItemsCount, float $resolvedItemsCount, float $totalItemsCount) + public function __construct(string $id, string $name, bool $isDefault, int $unresolvedItemsCount, int $resolvedItemsCount, int $totalItemsCount, ?string $description = null) { $this->id = $id; $this->name = $name; - $this->description = $description; - $this->filter = $filter; + $this->isDefault = $isDefault; $this->unresolvedItemsCount = $unresolvedItemsCount; $this->resolvedItemsCount = $resolvedItemsCount; $this->totalItemsCount = $totalItemsCount; + $this->description = $description; } } \ No newline at end of file diff --git a/src/Models/Errors/BadRequestError.php b/src/Models/Errors/BadRequestError.php index 9eba859..d8e3b37 100644 --- a/src/Models/Errors/BadRequestError.php +++ b/src/Models/Errors/BadRequestError.php @@ -26,7 +26,8 @@ class BadRequestError * * * - `invalid_request`: A parameter is invalid. `message` says which one. - * - `project_id_required`: An organization key called a project endpoint without naming the project in `Project-Id`, and the organization has more than one project. + * - `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`. * * @var \ModerationApi\Models\Components\BadRequestErrorCode $code diff --git a/src/Models/Errors/NotFoundError.php b/src/Models/Errors/NotFoundError.php index 73a27f9..063a117 100644 --- a/src/Models/Errors/NotFoundError.php +++ b/src/Models/Errors/NotFoundError.php @@ -29,6 +29,7 @@ class NotFoundError * - `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/src/Models/Operations/SubmitContentRecommendationAction.php b/src/Models/Operations/ActionResponse.php similarity index 86% rename from src/Models/Operations/SubmitContentRecommendationAction.php rename to src/Models/Operations/ActionResponse.php index 154b803..8ca3c67 100644 --- a/src/Models/Operations/SubmitContentRecommendationAction.php +++ b/src/Models/Operations/ActionResponse.php @@ -10,7 +10,7 @@ /** The action to take based on the recommendation */ -enum SubmitContentRecommendationAction: string +enum ActionResponse: string { case Review = 'review'; case Allow = 'allow'; diff --git a/src/Models/Operations/ActionStat.php b/src/Models/Operations/ActionStat.php deleted file mode 100644 index d9241ab..0000000 --- a/src/Models/Operations/ActionStat.php +++ /dev/null @@ -1,60 +0,0 @@ -actionId = $actionId; - $this->actionName = $actionName; - $this->count = $count; - $this->percentageOfTotal = $percentageOfTotal; - } -} \ No newline at end of file diff --git a/src/Models/Operations/AddWordlistWordsRequest.php b/src/Models/Operations/AddWordlistWordsRequest.php index 4b83231..db2fd46 100644 --- a/src/Models/Operations/AddWordlistWordsRequest.php +++ b/src/Models/Operations/AddWordlistWordsRequest.php @@ -27,7 +27,7 @@ class AddWordlistWordsRequest public AddWordlistWordsRequestBody $body; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/ListQueueItemsSortDirection.php b/src/Models/Operations/Bucket.php similarity index 59% rename from src/Models/Operations/ListQueueItemsSortDirection.php rename to src/Models/Operations/Bucket.php index 58cacd8..b22d43b 100644 --- a/src/Models/Operations/ListQueueItemsSortDirection.php +++ b/src/Models/Operations/Bucket.php @@ -9,9 +9,9 @@ namespace ModerationApi\Models\Operations; -/** Sort direction */ -enum ListQueueItemsSortDirection: string +/** The size of each entry in `volumes`. */ +enum Bucket: string { - case Asc = 'asc'; - case Desc = 'desc'; + case Hour = 'hour'; + case Day = 'day'; } diff --git a/src/Models/Operations/CasebookAgreement.php b/src/Models/Operations/CasebookAgreement.php deleted file mode 100644 index da8c5f3..0000000 --- a/src/Models/Operations/CasebookAgreement.php +++ /dev/null @@ -1,17 +0,0 @@ -id = $id; + $this->name = $name; + $this->requests = $requests; + $this->flagged = $flagged; + $this->flagRate = $flagRate; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CheckStatus.php b/src/Models/Operations/CheckStatus.php deleted file mode 100644 index 3801aa3..0000000 --- a/src/Models/Operations/CheckStatus.php +++ /dev/null @@ -1,17 +0,0 @@ - $labels + * @var ?array<\ModerationApi\Models\Operations\Label> $labels */ #[\Speakeasy\Serializer\Annotation\SerializedName('labels')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\SubmitContentLabel>|null')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\Label>|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?array $labels = null; @@ -77,7 +77,7 @@ class ClassifierOutput * @param float $probability * @param bool $flagged * @param ?array $flaggedFields - * @param ?array<\ModerationApi\Models\Operations\SubmitContentLabel> $labels + * @param ?array<\ModerationApi\Models\Operations\Label> $labels * @param ?array $data * @phpstan-pure */ diff --git a/src/Models/Operations/CreateActionRequest.php b/src/Models/Operations/CreateActionRequest.php index 0a38986..baf6966 100644 --- a/src/Models/Operations/CreateActionRequest.php +++ b/src/Models/Operations/CreateActionRequest.php @@ -19,7 +19,7 @@ class CreateActionRequest public CreateActionRequestBody $body; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/CreateAuthorRequest.php b/src/Models/Operations/CreateAuthorRequest.php index 5c4e3e5..3f240a6 100644 --- a/src/Models/Operations/CreateAuthorRequest.php +++ b/src/Models/Operations/CreateAuthorRequest.php @@ -19,7 +19,7 @@ class CreateAuthorRequest public CreateAuthorRequestBody $body; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/CreateFeedbackRequest.php b/src/Models/Operations/CreateFeedbackRequest.php new file mode 100644 index 0000000..f52d530 --- /dev/null +++ b/src/Models/Operations/CreateFeedbackRequest.php @@ -0,0 +1,39 @@ +body = $body; + $this->projectId = $projectId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateFeedbackRequestBody.php b/src/Models/Operations/CreateFeedbackRequestBody.php new file mode 100644 index 0000000..453bc52 --- /dev/null +++ b/src/Models/Operations/CreateFeedbackRequestBody.php @@ -0,0 +1,64 @@ +title = $title; + $this->description = $description; + $this->type = $type; + $this->source = $source; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateFeedbackResponse.php b/src/Models/Operations/CreateFeedbackResponse.php new file mode 100644 index 0000000..4fc2e87 --- /dev/null +++ b/src/Models/Operations/CreateFeedbackResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateFeedbackResponseBody.php b/src/Models/Operations/CreateFeedbackResponseBody.php new file mode 100644 index 0000000..9222cfa --- /dev/null +++ b/src/Models/Operations/CreateFeedbackResponseBody.php @@ -0,0 +1,41 @@ +id = $id; + $this->status = $status; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetQueueRecommendationAction.php b/src/Models/Operations/CreateFeedbackType.php similarity index 50% rename from src/Models/Operations/GetQueueRecommendationAction.php rename to src/Models/Operations/CreateFeedbackType.php index 11caf7b..71ce6ec 100644 --- a/src/Models/Operations/GetQueueRecommendationAction.php +++ b/src/Models/Operations/CreateFeedbackType.php @@ -9,9 +9,10 @@ namespace ModerationApi\Models\Operations; -enum GetQueueRecommendationAction: string +/** The kind of feedback. */ +enum CreateFeedbackType: string { - case Review = 'review'; - case Allow = 'allow'; - case Reject = 'reject'; + case FeatureRequest = 'feature_request'; + case Bug = 'bug'; + case Other = 'other'; } diff --git a/src/Models/Operations/CreateProjectApiKeyRequest.php b/src/Models/Operations/CreateProjectApiKeyRequest.php new file mode 100644 index 0000000..9b72b89 --- /dev/null +++ b/src/Models/Operations/CreateProjectApiKeyRequest.php @@ -0,0 +1,39 @@ +id = $id; + $this->body = $body; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateProjectApiKeyRequestBody.php b/src/Models/Operations/CreateProjectApiKeyRequestBody.php new file mode 100644 index 0000000..f51574f --- /dev/null +++ b/src/Models/Operations/CreateProjectApiKeyRequestBody.php @@ -0,0 +1,31 @@ +name = $name; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateProjectApiKeyResponse.php b/src/Models/Operations/CreateProjectApiKeyResponse.php new file mode 100644 index 0000000..aae2619 --- /dev/null +++ b/src/Models/Operations/CreateProjectApiKeyResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->projectApiKey = $projectApiKey; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateWebhookRequest.php b/src/Models/Operations/CreateWebhookRequest.php index 057b59e..37a8675 100644 --- a/src/Models/Operations/CreateWebhookRequest.php +++ b/src/Models/Operations/CreateWebhookRequest.php @@ -19,7 +19,7 @@ class CreateWebhookRequest public CreateWebhookRequestBody $body; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/CreateWordlistRequest.php b/src/Models/Operations/CreateWordlistRequest.php new file mode 100644 index 0000000..56add1a --- /dev/null +++ b/src/Models/Operations/CreateWordlistRequest.php @@ -0,0 +1,39 @@ +body = $body; + $this->projectId = $projectId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateWordlistRequestBody.php b/src/Models/Operations/CreateWordlistRequestBody.php new file mode 100644 index 0000000..1e35fdf --- /dev/null +++ b/src/Models/Operations/CreateWordlistRequestBody.php @@ -0,0 +1,64 @@ + $words + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('words')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $words = null; + + /** + * @param string $name + * @param ?string $key + * @param ?string $description + * @param ?array $words + * @phpstan-pure + */ + public function __construct(string $name, ?string $key = null, ?string $description = null, ?array $words = null) + { + $this->name = $name; + $this->key = $key; + $this->description = $description; + $this->words = $words; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateWordlistResponse.php b/src/Models/Operations/CreateWordlistResponse.php new file mode 100644 index 0000000..9e907c8 --- /dev/null +++ b/src/Models/Operations/CreateWordlistResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateWordlistResponseBody.php b/src/Models/Operations/CreateWordlistResponseBody.php new file mode 100644 index 0000000..a0df888 --- /dev/null +++ b/src/Models/Operations/CreateWordlistResponseBody.php @@ -0,0 +1,90 @@ + $words + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('words')] + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $words; + + /** + * Creation date of the wordlist + * + * @var string $createdAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('createdAt')] + public string $createdAt; + + /** + * ID of the organization + * + * @var string $organizationId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('organizationId')] + public string $organizationId; + + /** + * Strict mode + * + * @var bool $strict + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('strict')] + public bool $strict; + + /** + * + * @var ?string $name + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('name')] + public ?string $name; + + /** + * + * @var ?string $userId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('userId')] + public ?string $userId; + + /** + * @param string $id + * @param array $words + * @param string $createdAt + * @param string $organizationId + * @param bool $strict + * @param ?string $name + * @param ?string $userId + * @phpstan-pure + */ + public function __construct(string $id, array $words, string $createdAt, string $organizationId, bool $strict, ?string $name = null, ?string $userId = null) + { + $this->id = $id; + $this->words = $words; + $this->createdAt = $createdAt; + $this->organizationId = $organizationId; + $this->strict = $strict; + $this->name = $name; + $this->userId = $userId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DailyReviewCount.php b/src/Models/Operations/DailyReviewCount.php index e5e6b72..15cc77e 100644 --- a/src/Models/Operations/DailyReviewCount.php +++ b/src/Models/Operations/DailyReviewCount.php @@ -12,7 +12,7 @@ class DailyReviewCount { /** - * Date in YYYY-MM-DD format + * Date in YYYY-MM-DD format (UTC). * * @var string $date */ @@ -20,19 +20,19 @@ class DailyReviewCount public string $date; /** - * Number of reviews on this date + * Number of items resolved. * - * @var float $count + * @var int $count */ #[\Speakeasy\Serializer\Annotation\SerializedName('count')] - public float $count; + public int $count; /** * @param string $date - * @param float $count + * @param int $count * @phpstan-pure */ - public function __construct(string $date, float $count) + public function __construct(string $date, int $count) { $this->date = $date; $this->count = $count; diff --git a/src/Models/Operations/DeleteActionRequest.php b/src/Models/Operations/DeleteActionRequest.php index 2a50c92..8e243dd 100644 --- a/src/Models/Operations/DeleteActionRequest.php +++ b/src/Models/Operations/DeleteActionRequest.php @@ -20,7 +20,7 @@ class DeleteActionRequest public string $id; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/DeleteAuthorRequest.php b/src/Models/Operations/DeleteAuthorRequest.php index 8b7f4e6..15af87d 100644 --- a/src/Models/Operations/DeleteAuthorRequest.php +++ b/src/Models/Operations/DeleteAuthorRequest.php @@ -20,7 +20,7 @@ class DeleteAuthorRequest public string $id; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/DeleteWebhookRequest.php b/src/Models/Operations/DeleteWebhookRequest.php index f879c14..52e5ca3 100644 --- a/src/Models/Operations/DeleteWebhookRequest.php +++ b/src/Models/Operations/DeleteWebhookRequest.php @@ -20,7 +20,7 @@ class DeleteWebhookRequest public string $id; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/ExecuteActionRequest.php b/src/Models/Operations/ExecuteActionRequest.php index ce6a22b..4fa2f06 100644 --- a/src/Models/Operations/ExecuteActionRequest.php +++ b/src/Models/Operations/ExecuteActionRequest.php @@ -19,7 +19,7 @@ class ExecuteActionRequest public ExecuteActionRequestBody $body; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/Filter.php b/src/Models/Operations/Filter.php deleted file mode 100644 index cb5dd29..0000000 --- a/src/Models/Operations/Filter.php +++ /dev/null @@ -1,299 +0,0 @@ - $labels - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('labels')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $labels = null; - - /** - * $filterLabels - * - * @var ?array<\ModerationApi\Models\Operations\FilterLabel> $filterLabels - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('filterLabels')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\FilterLabel>|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $filterLabels = null; - - /** - * $metadataFilters - * - * @var ?array<\ModerationApi\Models\Operations\MetadataFilter> $metadataFilters - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('metadataFilters')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\MetadataFilter>|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $metadataFilters = null; - - /** - * $filteredChannelIds - * - * @var ?array $filteredChannelIds - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('filteredChannelIds')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $filteredChannelIds = null; - - /** - * $filteredActionIds - * - * @var ?array $filteredActionIds - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('filteredActionIds')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $filteredActionIds = null; - - /** - * $languages - * - * @var ?array $languages - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('languages')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $languages = null; - - /** - * $contentTypes - * - * @var ?array<\ModerationApi\Models\Operations\GetQueueContentType> $contentTypes - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('contentTypes')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\GetQueueContentType>|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $contentTypes = null; - - /** - * $mediaTypes - * - * @var ?array<\ModerationApi\Models\Operations\MediaType> $mediaTypes - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('mediaTypes')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\MediaType>|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $mediaTypes = null; - - /** - * $authorTrustLevels - * - * @var ?array $authorTrustLevels - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('authorTrustLevels')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $authorTrustLevels = null; - - /** - * $recommendationActions - * - * @var ?array<\ModerationApi\Models\Operations\GetQueueRecommendationAction> $recommendationActions - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('recommendationActions')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\GetQueueRecommendationAction>|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $recommendationActions = null; - - /** - * - * @var ?int $minSeverity - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('minSeverity')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?int $minSeverity = null; - - /** - * - * @var ?int $maxSeverity - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('maxSeverity')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?int $maxSeverity = null; - - /** - * - * @var ?string $afterDate - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('afterDate')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $afterDate = null; - - /** - * - * @var ?string $beforeDate - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('beforeDate')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $beforeDate = null; - - /** - * - * @var ?float $within - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('within')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?float $within = null; - - /** - * - * @var ?\ModerationApi\Models\Operations\WithinUnit $withinUnit - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('withinUnit')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\WithinUnit|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?WithinUnit $withinUnit = null; - - /** - * - * @var ?bool $clearDateWindow - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('clearDateWindow')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?bool $clearDateWindow = null; - - /** - * - * @var ?string $authorID - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('authorID')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $authorID = null; - - /** - * - * @var ?string $contentID - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('contentID')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $contentID = null; - - /** - * $conversationIds - * - * @var ?array $conversationIds - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('conversationIds')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $conversationIds = null; - - /** - * $search - * - * @var ?array $search - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('search')] - #[\Speakeasy\Serializer\Annotation\Type('array|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $search = null; - - /** - * - * @var ?\ModerationApi\Models\Operations\CheckStatus $checkStatus - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('checkStatus')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\CheckStatus|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CheckStatus $checkStatus = null; - - /** - * @param ?\ModerationApi\Models\Operations\IsFlagged $isFlagged - * @param ?\ModerationApi\Models\Operations\CasebookAnswer $casebookAnswer - * @param ?\ModerationApi\Models\Operations\CasebookAgreement $casebookAgreement - * @param ?array $labels - * @param ?array<\ModerationApi\Models\Operations\FilterLabel> $filterLabels - * @param ?array<\ModerationApi\Models\Operations\MetadataFilter> $metadataFilters - * @param ?array $filteredChannelIds - * @param ?array $filteredActionIds - * @param ?array $languages - * @param ?array<\ModerationApi\Models\Operations\GetQueueContentType> $contentTypes - * @param ?array<\ModerationApi\Models\Operations\MediaType> $mediaTypes - * @param ?array $authorTrustLevels - * @param ?array<\ModerationApi\Models\Operations\GetQueueRecommendationAction> $recommendationActions - * @param ?int $minSeverity - * @param ?int $maxSeverity - * @param ?string $afterDate - * @param ?string $beforeDate - * @param ?float $within - * @param ?\ModerationApi\Models\Operations\WithinUnit $withinUnit - * @param ?bool $clearDateWindow - * @param ?string $authorID - * @param ?string $contentID - * @param ?array $conversationIds - * @param ?array $search - * @param ?\ModerationApi\Models\Operations\CheckStatus $checkStatus - * @phpstan-pure - */ - public function __construct(?IsFlagged $isFlagged = null, ?CasebookAnswer $casebookAnswer = null, ?CasebookAgreement $casebookAgreement = null, ?array $labels = null, ?array $filterLabels = null, ?array $metadataFilters = null, ?array $filteredChannelIds = null, ?array $filteredActionIds = null, ?array $languages = null, ?array $contentTypes = null, ?array $mediaTypes = null, ?array $authorTrustLevels = null, ?array $recommendationActions = null, ?int $minSeverity = null, ?int $maxSeverity = null, ?string $afterDate = null, ?string $beforeDate = null, ?float $within = null, ?WithinUnit $withinUnit = null, ?bool $clearDateWindow = null, ?string $authorID = null, ?string $contentID = null, ?array $conversationIds = null, ?array $search = null, ?CheckStatus $checkStatus = null) - { - $this->isFlagged = $isFlagged; - $this->casebookAnswer = $casebookAnswer; - $this->casebookAgreement = $casebookAgreement; - $this->labels = $labels; - $this->filterLabels = $filterLabels; - $this->metadataFilters = $metadataFilters; - $this->filteredChannelIds = $filteredChannelIds; - $this->filteredActionIds = $filteredActionIds; - $this->languages = $languages; - $this->contentTypes = $contentTypes; - $this->mediaTypes = $mediaTypes; - $this->authorTrustLevels = $authorTrustLevels; - $this->recommendationActions = $recommendationActions; - $this->minSeverity = $minSeverity; - $this->maxSeverity = $maxSeverity; - $this->afterDate = $afterDate; - $this->beforeDate = $beforeDate; - $this->within = $within; - $this->withinUnit = $withinUnit; - $this->clearDateWindow = $clearDateWindow; - $this->authorID = $authorID; - $this->contentID = $contentID; - $this->conversationIds = $conversationIds; - $this->search = $search; - $this->checkStatus = $checkStatus; - } -} \ No newline at end of file diff --git a/src/Models/Operations/FilterLabel.php b/src/Models/Operations/FilterLabel.php deleted file mode 100644 index ebbef35..0000000 --- a/src/Models/Operations/FilterLabel.php +++ /dev/null @@ -1,59 +0,0 @@ -label = $label; - $this->type = $type; - $this->minThreshold = $minThreshold; - $this->maxThreshold = $maxThreshold; - } -} \ No newline at end of file diff --git a/src/Models/Operations/FlagRateSpike.php b/src/Models/Operations/FlagRateSpike.php new file mode 100644 index 0000000..3720577 --- /dev/null +++ b/src/Models/Operations/FlagRateSpike.php @@ -0,0 +1,70 @@ +multiple = $multiple; + $this->recentFlagRate = $recentFlagRate; + $this->baselineFlagRate = $baselineFlagRate; + $this->recentFlagged = $recentFlagged; + $this->recentRequests = $recentRequests; + } +} \ No newline at end of file diff --git a/src/Models/Operations/FlaggedContentTrend.php b/src/Models/Operations/FlaggedContentTrend.php deleted file mode 100644 index 8eabbc9..0000000 --- a/src/Models/Operations/FlaggedContentTrend.php +++ /dev/null @@ -1,40 +0,0 @@ -label = $label; - $this->trend = $trend; - } -} \ No newline at end of file diff --git a/src/Models/Operations/GetAccountRequest.php b/src/Models/Operations/GetAccountRequest.php index 9f23b2a..b26629d 100644 --- a/src/Models/Operations/GetAccountRequest.php +++ b/src/Models/Operations/GetAccountRequest.php @@ -12,7 +12,7 @@ class GetAccountRequest { /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/GetActionRequest.php b/src/Models/Operations/GetActionRequest.php index f61298a..9db30fa 100644 --- a/src/Models/Operations/GetActionRequest.php +++ b/src/Models/Operations/GetActionRequest.php @@ -20,7 +20,7 @@ class GetActionRequest public string $id; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/GetAnalyticsAuthorsAuthor.php b/src/Models/Operations/GetAnalyticsAuthorsAuthor.php new file mode 100644 index 0000000..eb6a053 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsAuthorsAuthor.php @@ -0,0 +1,50 @@ +authorId = $authorId; + $this->flagged = $flagged; + $this->name = $name; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsAuthorsQueryParamRange.php b/src/Models/Operations/GetAnalyticsAuthorsQueryParamRange.php new file mode 100644 index 0000000..5845a28 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsAuthorsQueryParamRange.php @@ -0,0 +1,19 @@ +channel = $channel; + $this->projectId = $projectId; + $this->range = $range; + $this->limit = $limit; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsAuthorsResponse.php b/src/Models/Operations/GetAnalyticsAuthorsResponse.php new file mode 100644 index 0000000..6e0f73d --- /dev/null +++ b/src/Models/Operations/GetAnalyticsAuthorsResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsAuthorsResponseBody.php b/src/Models/Operations/GetAnalyticsAuthorsResponseBody.php new file mode 100644 index 0000000..d276f1a --- /dev/null +++ b/src/Models/Operations/GetAnalyticsAuthorsResponseBody.php @@ -0,0 +1,53 @@ + $authors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('authors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\GetAnalyticsAuthorsAuthor>')] + public array $authors; + + /** + * The channel the numbers are for. Null when they are for all channels. + * + * @var ?string $channelId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('channelId')] + public ?string $channelId; + + /** + * @param \ModerationApi\Models\Operations\GetAnalyticsAuthorsRangeResponse $range + * @param array<\ModerationApi\Models\Operations\GetAnalyticsAuthorsAuthor> $authors + * @param ?string $channelId + * @phpstan-pure + */ + public function __construct(GetAnalyticsAuthorsRangeResponse $range, array $authors, ?string $channelId = null) + { + $this->range = $range; + $this->authors = $authors; + $this->channelId = $channelId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsAutomationQueryParamRange.php b/src/Models/Operations/GetAnalyticsAutomationQueryParamRange.php new file mode 100644 index 0000000..c876f88 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsAutomationQueryParamRange.php @@ -0,0 +1,19 @@ +channel = $channel; + $this->projectId = $projectId; + $this->range = $range; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsAutomationResponse.php b/src/Models/Operations/GetAnalyticsAutomationResponse.php new file mode 100644 index 0000000..d45e184 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsAutomationResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsAutomationResponseBody.php b/src/Models/Operations/GetAnalyticsAutomationResponseBody.php new file mode 100644 index 0000000..c2b845c --- /dev/null +++ b/src/Models/Operations/GetAnalyticsAutomationResponseBody.php @@ -0,0 +1,162 @@ + $rules + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('rules')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\Rule>')] + public array $rules; + + /** + * The channel the numbers are for. Null when they are for all channels. + * + * @var ?string $channelId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('channelId')] + public ?string $channelId; + + /** + * + * @var ?float $automationRate + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('automationRate')] + public ?float $automationRate; + + /** + * @param \ModerationApi\Models\Operations\GetAnalyticsAutomationRangeResponse $range + * @param int $flagged + * @param int $handledByRules + * @param int $handledByCasebook + * @param int $sentToReview + * @param int $mergedDuplicates + * @param int $reviewsAllowed + * @param int $reviewsRejected + * @param int $reviewsResolvedWithoutDecision + * @param int $reviewsUnresolved + * @param int $casebookOverrulings + * @param array<\ModerationApi\Models\Operations\Rule> $rules + * @param ?string $channelId + * @param ?float $automationRate + * @phpstan-pure + */ + public function __construct(GetAnalyticsAutomationRangeResponse $range, int $flagged, int $handledByRules, int $handledByCasebook, int $sentToReview, int $mergedDuplicates, int $reviewsAllowed, int $reviewsRejected, int $reviewsResolvedWithoutDecision, int $reviewsUnresolved, int $casebookOverrulings, array $rules, ?string $channelId = null, ?float $automationRate = null) + { + $this->range = $range; + $this->flagged = $flagged; + $this->handledByRules = $handledByRules; + $this->handledByCasebook = $handledByCasebook; + $this->sentToReview = $sentToReview; + $this->mergedDuplicates = $mergedDuplicates; + $this->reviewsAllowed = $reviewsAllowed; + $this->reviewsRejected = $reviewsRejected; + $this->reviewsResolvedWithoutDecision = $reviewsResolvedWithoutDecision; + $this->reviewsUnresolved = $reviewsUnresolved; + $this->casebookOverrulings = $casebookOverrulings; + $this->rules = $rules; + $this->channelId = $channelId; + $this->automationRate = $automationRate; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsChannelsQueryParamRange.php b/src/Models/Operations/GetAnalyticsChannelsQueryParamRange.php new file mode 100644 index 0000000..0b4eefd --- /dev/null +++ b/src/Models/Operations/GetAnalyticsChannelsQueryParamRange.php @@ -0,0 +1,19 @@ +projectId = $projectId; + $this->range = $range; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsChannelsResponse.php b/src/Models/Operations/GetAnalyticsChannelsResponse.php new file mode 100644 index 0000000..44ba963 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsChannelsResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsChannelsResponseBody.php b/src/Models/Operations/GetAnalyticsChannelsResponseBody.php new file mode 100644 index 0000000..f4447dd --- /dev/null +++ b/src/Models/Operations/GetAnalyticsChannelsResponseBody.php @@ -0,0 +1,43 @@ + $channels + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('channels')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\Channel>')] + public array $channels; + + /** + * @param \ModerationApi\Models\Operations\GetAnalyticsChannelsRangeResponse $range + * @param array<\ModerationApi\Models\Operations\Channel> $channels + * @phpstan-pure + */ + public function __construct(GetAnalyticsChannelsRangeResponse $range, array $channels) + { + $this->range = $range; + $this->channels = $channels; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsPoliciesPolicy.php b/src/Models/Operations/GetAnalyticsPoliciesPolicy.php new file mode 100644 index 0000000..5dc2eb0 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsPoliciesPolicy.php @@ -0,0 +1,50 @@ +label = $label; + $this->flagged = $flagged; + $this->previousFlagged = $previousFlagged; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsPoliciesQueryParamRange.php b/src/Models/Operations/GetAnalyticsPoliciesQueryParamRange.php new file mode 100644 index 0000000..8bf9334 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsPoliciesQueryParamRange.php @@ -0,0 +1,19 @@ +channel = $channel; + $this->projectId = $projectId; + $this->range = $range; + $this->limit = $limit; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsPoliciesResponse.php b/src/Models/Operations/GetAnalyticsPoliciesResponse.php new file mode 100644 index 0000000..7cb58b0 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsPoliciesResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsPoliciesResponseBody.php b/src/Models/Operations/GetAnalyticsPoliciesResponseBody.php new file mode 100644 index 0000000..07b51c0 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsPoliciesResponseBody.php @@ -0,0 +1,53 @@ + $policies + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('policies')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\GetAnalyticsPoliciesPolicy>')] + public array $policies; + + /** + * The channel the numbers are for. Null when they are for all channels. + * + * @var ?string $channelId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('channelId')] + public ?string $channelId; + + /** + * @param \ModerationApi\Models\Operations\GetAnalyticsPoliciesRangeResponse $range + * @param array<\ModerationApi\Models\Operations\GetAnalyticsPoliciesPolicy> $policies + * @param ?string $channelId + * @phpstan-pure + */ + public function __construct(GetAnalyticsPoliciesRangeResponse $range, array $policies, ?string $channelId = null) + { + $this->range = $range; + $this->policies = $policies; + $this->channelId = $channelId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsSummaryQueryParamRange.php b/src/Models/Operations/GetAnalyticsSummaryQueryParamRange.php new file mode 100644 index 0000000..a7a962a --- /dev/null +++ b/src/Models/Operations/GetAnalyticsSummaryQueryParamRange.php @@ -0,0 +1,19 @@ +channel = $channel; + $this->projectId = $projectId; + $this->range = $range; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsSummaryResponse.php b/src/Models/Operations/GetAnalyticsSummaryResponse.php new file mode 100644 index 0000000..5372635 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsSummaryResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsSummaryResponseBody.php b/src/Models/Operations/GetAnalyticsSummaryResponseBody.php new file mode 100644 index 0000000..d4ade2f --- /dev/null +++ b/src/Models/Operations/GetAnalyticsSummaryResponseBody.php @@ -0,0 +1,85 @@ +range = $range; + $this->totals = $totals; + $this->previousPeriod = $previousPeriod; + $this->pendingReview = $pendingReview; + $this->channelId = $channelId; + $this->flagRateSpike = $flagRateSpike; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsVolumesQueryParamRange.php b/src/Models/Operations/GetAnalyticsVolumesQueryParamRange.php new file mode 100644 index 0000000..a337406 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsVolumesQueryParamRange.php @@ -0,0 +1,19 @@ +channel = $channel; + $this->projectId = $projectId; + $this->range = $range; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsVolumesResponse.php b/src/Models/Operations/GetAnalyticsVolumesResponse.php new file mode 100644 index 0000000..0eddd5a --- /dev/null +++ b/src/Models/Operations/GetAnalyticsVolumesResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAnalyticsVolumesResponseBody.php b/src/Models/Operations/GetAnalyticsVolumesResponseBody.php new file mode 100644 index 0000000..5711784 --- /dev/null +++ b/src/Models/Operations/GetAnalyticsVolumesResponseBody.php @@ -0,0 +1,64 @@ + $volumes + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('volumes')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\Volume>')] + public array $volumes; + + /** + * The channel the numbers are for. Null when they are for all channels. + * + * @var ?string $channelId + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('channelId')] + public ?string $channelId; + + /** + * @param \ModerationApi\Models\Operations\GetAnalyticsVolumesRangeResponse $range + * @param \ModerationApi\Models\Operations\Bucket $bucket + * @param array<\ModerationApi\Models\Operations\Volume> $volumes + * @param ?string $channelId + * @phpstan-pure + */ + public function __construct(GetAnalyticsVolumesRangeResponse $range, Bucket $bucket, array $volumes, ?string $channelId = null) + { + $this->range = $range; + $this->bucket = $bucket; + $this->volumes = $volumes; + $this->channelId = $channelId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetAuthorRequest.php b/src/Models/Operations/GetAuthorRequest.php index 5c88e1c..9eaa08e 100644 --- a/src/Models/Operations/GetAuthorRequest.php +++ b/src/Models/Operations/GetAuthorRequest.php @@ -20,7 +20,7 @@ class GetAuthorRequest public string $id; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/GetQueueContentType.php b/src/Models/Operations/GetQueueContentType.php deleted file mode 100644 index 0c7c449..0000000 --- a/src/Models/Operations/GetQueueContentType.php +++ /dev/null @@ -1,23 +0,0 @@ -queue = $queue; } diff --git a/src/Models/Operations/GetQueueStatsRequest.php b/src/Models/Operations/GetQueueStatsRequest.php index 9c52168..8ff505e 100644 --- a/src/Models/Operations/GetQueueStatsRequest.php +++ b/src/Models/Operations/GetQueueStatsRequest.php @@ -12,7 +12,7 @@ class GetQueueStatsRequest { /** - * The queue ID + * The queue ID. * * @var string $id */ @@ -20,7 +20,7 @@ class GetQueueStatsRequest public string $id; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/GetQueueStatsResponseBody.php b/src/Models/Operations/GetQueueStatsResponseBody.php index fce5fae..0c22612 100644 --- a/src/Models/Operations/GetQueueStatsResponseBody.php +++ b/src/Models/Operations/GetQueueStatsResponseBody.php @@ -21,16 +21,7 @@ class GetQueueStatsResponseBody public ReviewStats $reviewStats; /** - * $actionStats - * - * @var array<\ModerationApi\Models\Operations\ActionStat> $actionStats - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('actionStats')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\ActionStat>')] - public array $actionStats; - - /** - * List of top reviewers and their statistics + * Reviewers with the most resolved items, most first. Up to 10. * * @var array<\ModerationApi\Models\Operations\TopReviewer> $topReviewers */ @@ -48,15 +39,13 @@ class GetQueueStatsResponseBody /** * @param \ModerationApi\Models\Operations\ReviewStats $reviewStats - * @param array<\ModerationApi\Models\Operations\ActionStat> $actionStats * @param array<\ModerationApi\Models\Operations\TopReviewer> $topReviewers * @param \ModerationApi\Models\Operations\Trends $trends * @phpstan-pure */ - public function __construct(ReviewStats $reviewStats, array $actionStats, array $topReviewers, Trends $trends) + public function __construct(ReviewStats $reviewStats, array $topReviewers, Trends $trends) { $this->reviewStats = $reviewStats; - $this->actionStats = $actionStats; $this->topReviewers = $topReviewers; $this->trends = $trends; } diff --git a/src/Models/Operations/GetQueueType.php b/src/Models/Operations/GetQueueType.php deleted file mode 100644 index b4afa70..0000000 --- a/src/Models/Operations/GetQueueType.php +++ /dev/null @@ -1,18 +0,0 @@ - $contentTypes - */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=contentTypes')] - public ?array $contentTypes = null; - - /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ @@ -65,28 +57,26 @@ class ListAuthorsRequest /** * Sort direction * - * @var ?\ModerationApi\Models\Operations\ListAuthorsSortDirection $sortDirection + * @var ?\ModerationApi\Models\Operations\SortDirection $sortDirection */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=sortDirection')] - public ?ListAuthorsSortDirection $sortDirection = null; + public ?SortDirection $sortDirection = null; /** * @param ?int $page * @param ?int $pageSize * @param ?\ModerationApi\Models\Operations\SortBy $sortBy - * @param ?\ModerationApi\Models\Operations\ListAuthorsSortDirection $sortDirection + * @param ?\ModerationApi\Models\Operations\SortDirection $sortDirection * @param ?string $memberSinceDate * @param ?string $lastActiveDate - * @param ?array $contentTypes * @param ?string $projectId * @phpstan-pure */ - public function __construct(?SortBy $sortBy = null, ?string $memberSinceDate = null, ?string $lastActiveDate = null, ?array $contentTypes = null, ?string $projectId = null, ?int $page = 1, ?int $pageSize = 20, ?ListAuthorsSortDirection $sortDirection = ListAuthorsSortDirection::Desc) + public function __construct(?SortBy $sortBy = null, ?string $memberSinceDate = null, ?string $lastActiveDate = null, ?string $projectId = null, ?int $page = 1, ?int $pageSize = 20, ?SortDirection $sortDirection = SortDirection::Desc) { $this->sortBy = $sortBy; $this->memberSinceDate = $memberSinceDate; $this->lastActiveDate = $lastActiveDate; - $this->contentTypes = $contentTypes; $this->projectId = $projectId; $this->page = $page; $this->pageSize = $pageSize; diff --git a/src/Models/Operations/ListQueueItemsAction.php b/src/Models/Operations/ListQueueItemsAction.php deleted file mode 100644 index fb1c6ee..0000000 --- a/src/Models/Operations/ListQueueItemsAction.php +++ /dev/null @@ -1,72 +0,0 @@ -id = $id; - $this->name = $name; - $this->timestamp = $timestamp; - $this->comment = $comment; - $this->reviewer = $reviewer; - } -} \ No newline at end of file diff --git a/src/Models/Operations/ListQueueItemsData.php b/src/Models/Operations/ListQueueItemsData.php deleted file mode 100644 index 976de4d..0000000 --- a/src/Models/Operations/ListQueueItemsData.php +++ /dev/null @@ -1,138 +0,0 @@ - $labels - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('labels')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\ListQueueItemsLabel>')] - public array $labels; - - /** - * Whether the item is flagged by any label - * - * @var bool $flagged - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('flagged')] - public bool $flagged; - - /** - * Status of the item - * - * @var \ModerationApi\Models\Operations\ListQueueItemsStatus $status - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('status')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\ListQueueItemsStatus')] - public ListQueueItemsStatus $status; - - /** - * Unix timestamp of when the item was created - * - * @var float $timestamp - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('timestamp')] - public float $timestamp; - - /** - * Content language - * - * @var ?string $language - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('language')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $language = null; - - /** - * Conversation ID - * - * @var ?string $conversationId - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('conversationId')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $conversationId = null; - - /** - * Author ID - * - * @var ?string $authorId - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('authorId')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $authorId = null; - - /** - * Action IDs taken on this item - * - * @var ?array<\ModerationApi\Models\Operations\ListQueueItemsAction> $actions - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('actions')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\ListQueueItemsAction>|null')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?array $actions = null; - - /** - * Type of the content object - * - * @var ?string $contentType - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('contentType')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $contentType = null; - - /** - * @param string $id - * @param string $content - * @param array<\ModerationApi\Models\Operations\ListQueueItemsLabel> $labels - * @param bool $flagged - * @param \ModerationApi\Models\Operations\ListQueueItemsStatus $status - * @param float $timestamp - * @param ?string $language - * @param ?string $conversationId - * @param ?string $authorId - * @param ?array<\ModerationApi\Models\Operations\ListQueueItemsAction> $actions - * @param ?string $contentType - * @phpstan-pure - */ - public function __construct(string $id, string $content, array $labels, bool $flagged, ListQueueItemsStatus $status, float $timestamp, ?string $language = null, ?string $conversationId = null, ?string $authorId = null, ?array $actions = null, ?string $contentType = null) - { - $this->id = $id; - $this->content = $content; - $this->labels = $labels; - $this->flagged = $flagged; - $this->status = $status; - $this->timestamp = $timestamp; - $this->language = $language; - $this->conversationId = $conversationId; - $this->authorId = $authorId; - $this->actions = $actions; - $this->contentType = $contentType; - } -} \ No newline at end of file diff --git a/src/Models/Operations/ListQueueItemsLabel.php b/src/Models/Operations/ListQueueItemsLabel.php deleted file mode 100644 index 56bb285..0000000 --- a/src/Models/Operations/ListQueueItemsLabel.php +++ /dev/null @@ -1,50 +0,0 @@ -label = $label; - $this->score = $score; - $this->flagged = $flagged; - } -} \ No newline at end of file diff --git a/src/Models/Operations/ListQueueItemsRequest.php b/src/Models/Operations/ListQueueItemsRequest.php index 138da00..913b163 100644 --- a/src/Models/Operations/ListQueueItemsRequest.php +++ b/src/Models/Operations/ListQueueItemsRequest.php @@ -12,7 +12,7 @@ class ListQueueItemsRequest { /** - * The queue ID + * The queue ID. * * @var string $id */ @@ -21,10 +21,17 @@ class ListQueueItemsRequest /** * - * @var ?\ModerationApi\Models\Operations\SortField $sortField + * @var ?\ModerationApi\Models\Operations\Sort $sort */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=sortField')] - public ?SortField $sortField = null; + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=sort')] + public ?Sort $sort = null; + + /** + * + * @var ?bool $includeResolved + */ + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=includeResolved')] + public ?bool $includeResolved = null; /** * $conversationIds @@ -44,42 +51,35 @@ class ListQueueItemsRequest /** * - * @var ?string $afterDate - */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=afterDate')] - public ?string $afterDate = null; - - /** - * - * @var ?string $beforeDate + * @var ?string $authorId */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=beforeDate')] - public ?string $beforeDate = null; + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=authorId')] + public ?string $authorId = null; /** + * $filteredActionIds * - * @var ?bool $includeResolved + * @var ?array $filteredActionIds */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=includeResolved')] - public ?bool $includeResolved = null; + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=filteredActionIds')] + public ?array $filteredActionIds = null; /** * - * @var ?string $authorId + * @var ?string $afterDate */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=authorId')] - public ?string $authorId = null; + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=afterDate')] + public ?string $afterDate = null; /** - * $filteredActionIds * - * @var ?array $filteredActionIds + * @var ?string $beforeDate */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=filteredActionIds')] - public ?array $filteredActionIds = null; + #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=beforeDate')] + public ?string $beforeDate = null; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ @@ -100,44 +100,34 @@ class ListQueueItemsRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=pageSize')] public ?int $pageSize = null; - /** - * Sort direction - * - * @var ?\ModerationApi\Models\Operations\ListQueueItemsSortDirection $sortDirection - */ - #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=sortDirection')] - public ?ListQueueItemsSortDirection $sortDirection = null; - /** * @param string $id * @param ?int $page * @param ?int $pageSize - * @param ?\ModerationApi\Models\Operations\SortField $sortField - * @param ?\ModerationApi\Models\Operations\ListQueueItemsSortDirection $sortDirection + * @param ?\ModerationApi\Models\Operations\Sort $sort + * @param ?bool $includeResolved * @param ?array $conversationIds * @param ?array $labels - * @param ?string $afterDate - * @param ?string $beforeDate - * @param ?bool $includeResolved * @param ?string $authorId * @param ?array $filteredActionIds + * @param ?string $afterDate + * @param ?string $beforeDate * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, ?SortField $sortField = null, ?array $conversationIds = null, ?array $labels = null, ?string $afterDate = null, ?string $beforeDate = null, ?bool $includeResolved = null, ?string $authorId = null, ?array $filteredActionIds = null, ?string $projectId = null, ?int $page = 1, ?int $pageSize = 20, ?ListQueueItemsSortDirection $sortDirection = ListQueueItemsSortDirection::Desc) + public function __construct(string $id, ?Sort $sort = null, ?bool $includeResolved = null, ?array $conversationIds = null, ?array $labels = null, ?string $authorId = null, ?array $filteredActionIds = null, ?string $afterDate = null, ?string $beforeDate = null, ?string $projectId = null, ?int $page = 1, ?int $pageSize = 20) { $this->id = $id; - $this->sortField = $sortField; + $this->sort = $sort; + $this->includeResolved = $includeResolved; $this->conversationIds = $conversationIds; $this->labels = $labels; - $this->afterDate = $afterDate; - $this->beforeDate = $beforeDate; - $this->includeResolved = $includeResolved; $this->authorId = $authorId; $this->filteredActionIds = $filteredActionIds; + $this->afterDate = $afterDate; + $this->beforeDate = $beforeDate; $this->projectId = $projectId; $this->page = $page; $this->pageSize = $pageSize; - $this->sortDirection = $sortDirection; } } \ No newline at end of file diff --git a/src/Models/Operations/ListQueueItemsResponseBody.php b/src/Models/Operations/ListQueueItemsResponseBody.php index dac4c25..f16e582 100644 --- a/src/Models/Operations/ListQueueItemsResponseBody.php +++ b/src/Models/Operations/ListQueueItemsResponseBody.php @@ -15,10 +15,10 @@ class ListQueueItemsResponseBody /** * The items on this page. * - * @var array<\ModerationApi\Models\Operations\ListQueueItemsData> $data + * @var array<\ModerationApi\Models\Components\QueueItem> $data */ #[\Speakeasy\Serializer\Annotation\SerializedName('data')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\ListQueueItemsData>')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Components\QueueItem>')] public array $data; /** @@ -31,7 +31,7 @@ class ListQueueItemsResponseBody public Components\Pagination $pagination; /** - * @param array<\ModerationApi\Models\Operations\ListQueueItemsData> $data + * @param array<\ModerationApi\Models\Components\QueueItem> $data * @param \ModerationApi\Models\Components\Pagination $pagination * @phpstan-pure */ diff --git a/src/Models/Operations/ListQueuesRequest.php b/src/Models/Operations/ListQueuesRequest.php new file mode 100644 index 0000000..327b5da --- /dev/null +++ b/src/Models/Operations/ListQueuesRequest.php @@ -0,0 +1,48 @@ +projectId = $projectId; + $this->page = $page; + $this->pageSize = $pageSize; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ListQueuesResponse.php b/src/Models/Operations/ListQueuesResponse.php new file mode 100644 index 0000000..9799b7b --- /dev/null +++ b/src/Models/Operations/ListQueuesResponse.php @@ -0,0 +1,73 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } + /** + * @param string $name + * @param array $args + * @return ?ListQueuesResponse + */ + public function __call($name, $args): ?ListQueuesResponse + { + if ($name === 'next') { + return call_user_func_array($this->next, $args); + } + + return null; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ListQueuesResponseBody.php b/src/Models/Operations/ListQueuesResponseBody.php new file mode 100644 index 0000000..f5d7975 --- /dev/null +++ b/src/Models/Operations/ListQueuesResponseBody.php @@ -0,0 +1,43 @@ + $data + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('data')] + #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Components\Queue>')] + public array $data; + + /** + * Where this page is in the full list. + * + * @var \ModerationApi\Models\Components\Pagination $pagination + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('pagination')] + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Components\Pagination')] + public Components\Pagination $pagination; + + /** + * @param array<\ModerationApi\Models\Components\Queue> $data + * @param \ModerationApi\Models\Components\Pagination $pagination + * @phpstan-pure + */ + public function __construct(array $data, Components\Pagination $pagination) + { + $this->data = $data; + $this->pagination = $pagination; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ListWebhooksRequest.php b/src/Models/Operations/ListWebhooksRequest.php index 076c2d0..9fc4dbd 100644 --- a/src/Models/Operations/ListWebhooksRequest.php +++ b/src/Models/Operations/ListWebhooksRequest.php @@ -12,7 +12,7 @@ class ListWebhooksRequest { /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/ListWordlistsRequest.php b/src/Models/Operations/ListWordlistsRequest.php index 9ce7bdf..8de5c3c 100644 --- a/src/Models/Operations/ListWordlistsRequest.php +++ b/src/Models/Operations/ListWordlistsRequest.php @@ -12,7 +12,7 @@ class ListWordlistsRequest { /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/MediaType.php b/src/Models/Operations/MediaType.php deleted file mode 100644 index 0d62d5d..0000000 --- a/src/Models/Operations/MediaType.php +++ /dev/null @@ -1,19 +0,0 @@ -key = $key; - $this->value = $value; - } -} \ No newline at end of file diff --git a/src/Models/Operations/PreviousPeriod.php b/src/Models/Operations/PreviousPeriod.php new file mode 100644 index 0000000..0e9e666 --- /dev/null +++ b/src/Models/Operations/PreviousPeriod.php @@ -0,0 +1,101 @@ +requests = $requests; + $this->flagged = $flagged; + $this->flagRate = $flagRate; + $this->allowed = $allowed; + $this->rejected = $rejected; + $this->sentToReview = $sentToReview; + $this->handledAutomatically = $handledAutomatically; + $this->flaggedButAllowed = $flaggedButAllowed; + } +} \ No newline at end of file diff --git a/src/Models/Operations/Recommendation.php b/src/Models/Operations/Recommendation.php index aa7b198..225590d 100644 --- a/src/Models/Operations/Recommendation.php +++ b/src/Models/Operations/Recommendation.php @@ -15,11 +15,11 @@ class Recommendation /** * The action to take based on the recommendation * - * @var \ModerationApi\Models\Operations\SubmitContentRecommendationAction $action + * @var \ModerationApi\Models\Operations\ActionResponse $action */ #[\Speakeasy\Serializer\Annotation\SerializedName('action')] - #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\SubmitContentRecommendationAction')] - public SubmitContentRecommendationAction $action; + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\ActionResponse')] + public ActionResponse $action; /** * 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. @@ -41,12 +41,12 @@ class Recommendation public ?array $matchedRules = null; /** - * @param \ModerationApi\Models\Operations\SubmitContentRecommendationAction $action + * @param \ModerationApi\Models\Operations\ActionResponse $action * @param array<\ModerationApi\Models\Operations\ReasonCodeEnum|string> $reasonCodes * @param ?array<\ModerationApi\Models\Operations\MatchedRule> $matchedRules * @phpstan-pure */ - public function __construct(SubmitContentRecommendationAction $action, array $reasonCodes, ?array $matchedRules = null) + public function __construct(ActionResponse $action, array $reasonCodes, ?array $matchedRules = null) { $this->action = $action; $this->reasonCodes = $reasonCodes; diff --git a/src/Models/Operations/RemoveWordlistWordsRequest.php b/src/Models/Operations/RemoveWordlistWordsRequest.php index ad55e37..550fa45 100644 --- a/src/Models/Operations/RemoveWordlistWordsRequest.php +++ b/src/Models/Operations/RemoveWordlistWordsRequest.php @@ -28,7 +28,7 @@ class RemoveWordlistWordsRequest public array $words; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/ResolveQueueItemRequest.php b/src/Models/Operations/ResolveQueueItemRequest.php index ae449f8..3df6526 100644 --- a/src/Models/Operations/ResolveQueueItemRequest.php +++ b/src/Models/Operations/ResolveQueueItemRequest.php @@ -12,7 +12,7 @@ class ResolveQueueItemRequest { /** - * The queue ID + * The queue ID. * * @var string $id */ @@ -20,7 +20,7 @@ class ResolveQueueItemRequest public string $id; /** - * The item ID to resolve + * The item ID to resolve. * * @var string $itemId */ @@ -28,14 +28,7 @@ class ResolveQueueItemRequest public string $itemId; /** - * - * @var \ModerationApi\Models\Operations\ResolveQueueItemRequestBody $body - */ - #[SpeakeasyMetadata('request:mediaType=application/json')] - public ResolveQueueItemRequestBody $body; - - /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ @@ -45,15 +38,13 @@ class ResolveQueueItemRequest /** * @param string $id * @param string $itemId - * @param \ModerationApi\Models\Operations\ResolveQueueItemRequestBody $body * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, string $itemId, ResolveQueueItemRequestBody $body, ?string $projectId = null) + public function __construct(string $id, string $itemId, ?string $projectId = null) { $this->id = $id; $this->itemId = $itemId; - $this->body = $body; $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/ResolveQueueItemRequestBody.php b/src/Models/Operations/ResolveQueueItemRequestBody.php deleted file mode 100644 index 11d1724..0000000 --- a/src/Models/Operations/ResolveQueueItemRequestBody.php +++ /dev/null @@ -1,31 +0,0 @@ -comment = $comment; - } -} \ No newline at end of file diff --git a/src/Models/Operations/ResolveQueueItemResponseBody.php b/src/Models/Operations/ResolveQueueItemResponseBody.php index 0ced498..35e0b40 100644 --- a/src/Models/Operations/ResolveQueueItemResponseBody.php +++ b/src/Models/Operations/ResolveQueueItemResponseBody.php @@ -20,32 +20,21 @@ class ResolveQueueItemResponseBody public bool $success; /** - * Timestamp when the item was resolved + * When the item was resolved (ISO 8601). * * @var string $resolvedAt */ #[\Speakeasy\Serializer\Annotation\SerializedName('resolvedAt')] public string $resolvedAt; - /** - * Optional comment - * - * @var ?string $comment - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('comment')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?string $comment = null; - /** * @param bool $success * @param string $resolvedAt - * @param ?string $comment * @phpstan-pure */ - public function __construct(bool $success, string $resolvedAt, ?string $comment = null) + public function __construct(bool $success, string $resolvedAt) { $this->success = $success; $this->resolvedAt = $resolvedAt; - $this->comment = $comment; } } \ No newline at end of file diff --git a/src/Models/Operations/ResolveQueueItemsRequest.php b/src/Models/Operations/ResolveQueueItemsRequest.php new file mode 100644 index 0000000..eb0f7fe --- /dev/null +++ b/src/Models/Operations/ResolveQueueItemsRequest.php @@ -0,0 +1,49 @@ +id = $id; + $this->body = $body; + $this->projectId = $projectId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ResolveQueueItemsRequestBody.php b/src/Models/Operations/ResolveQueueItemsRequestBody.php new file mode 100644 index 0000000..219d6bf --- /dev/null +++ b/src/Models/Operations/ResolveQueueItemsRequestBody.php @@ -0,0 +1,31 @@ + $itemIds + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('itemIds')] + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $itemIds; + + /** + * @param array $itemIds + * @phpstan-pure + */ + public function __construct(array $itemIds) + { + $this->itemIds = $itemIds; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ResolveQueueItemsResponse.php b/src/Models/Operations/ResolveQueueItemsResponse.php new file mode 100644 index 0000000..5104bbd --- /dev/null +++ b/src/Models/Operations/ResolveQueueItemsResponse.php @@ -0,0 +1,56 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ResolveQueueItemsResponseBody.php b/src/Models/Operations/ResolveQueueItemsResponseBody.php new file mode 100644 index 0000000..a10360f --- /dev/null +++ b/src/Models/Operations/ResolveQueueItemsResponseBody.php @@ -0,0 +1,42 @@ + $notFoundIds + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('notFoundIds')] + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $notFoundIds; + + /** + * @param int $resolved + * @param array $notFoundIds + * @phpstan-pure + */ + public function __construct(int $resolved, array $notFoundIds) + { + $this->resolved = $resolved; + $this->notFoundIds = $notFoundIds; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ReviewStats.php b/src/Models/Operations/ReviewStats.php index b589f69..8707769 100644 --- a/src/Models/Operations/ReviewStats.php +++ b/src/Models/Operations/ReviewStats.php @@ -12,38 +12,28 @@ class ReviewStats { /** - * Average time in milliseconds to review an item + * Number of items resolved in this queue in the period. * - * @var float $averageTimeToReview - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('averageTimeToReview')] - public float $averageTimeToReview; - - /** - * Total number of items reviewed - * - * @var float $totalReviewed + * @var int $totalReviewed */ #[\Speakeasy\Serializer\Annotation\SerializedName('totalReviewed')] - public float $totalReviewed; + public int $totalReviewed; /** - * Total number of items pending review + * Number of items submitted in the period that wait for review now. * - * @var float $totalPending + * @var int $totalPending */ #[\Speakeasy\Serializer\Annotation\SerializedName('totalPending')] - public float $totalPending; + public int $totalPending; /** - * @param float $averageTimeToReview - * @param float $totalReviewed - * @param float $totalPending + * @param int $totalReviewed + * @param int $totalPending * @phpstan-pure */ - public function __construct(float $averageTimeToReview, float $totalReviewed, float $totalPending) + public function __construct(int $totalReviewed, int $totalPending) { - $this->averageTimeToReview = $averageTimeToReview; $this->totalReviewed = $totalReviewed; $this->totalPending = $totalPending; } diff --git a/src/Models/Operations/Rule.php b/src/Models/Operations/Rule.php new file mode 100644 index 0000000..727eaf2 --- /dev/null +++ b/src/Models/Operations/Rule.php @@ -0,0 +1,40 @@ +name = $name; + $this->count = $count; + } +} \ No newline at end of file diff --git a/src/Models/Operations/SortField.php b/src/Models/Operations/Sort.php similarity index 54% rename from src/Models/Operations/SortField.php rename to src/Models/Operations/Sort.php index 77ccf99..4725212 100644 --- a/src/Models/Operations/SortField.php +++ b/src/Models/Operations/Sort.php @@ -10,9 +10,10 @@ -enum SortField: string +enum Sort: string { - case CreatedAt = 'createdAt'; - case Severity = 'severity'; - case ReviewedAt = 'reviewedAt'; + case Fifo = 'FIFO'; + case Lifo = 'LIFO'; + case Random = 'RANDOM'; + case SeverityDesc = 'SEVERITY_DESC'; } diff --git a/src/Models/Operations/SortBy.php b/src/Models/Operations/SortBy.php index 400e222..1cad0b8 100644 --- a/src/Models/Operations/SortBy.php +++ b/src/Models/Operations/SortBy.php @@ -14,7 +14,6 @@ enum SortBy: string { case TrustLevel = 'trustLevel'; case ViolationCount = 'violationCount'; - case ReportCount = 'reportCount'; case MemberSince = 'memberSince'; case LastActive = 'lastActive'; case ContentCount = 'contentCount'; diff --git a/src/Models/Operations/ListAuthorsSortDirection.php b/src/Models/Operations/SortDirection.php similarity index 85% rename from src/Models/Operations/ListAuthorsSortDirection.php rename to src/Models/Operations/SortDirection.php index 5f78bb5..7610249 100644 --- a/src/Models/Operations/ListAuthorsSortDirection.php +++ b/src/Models/Operations/SortDirection.php @@ -10,7 +10,7 @@ /** Sort direction */ -enum ListAuthorsSortDirection: string +enum SortDirection: string { case Asc = 'asc'; case Desc = 'desc'; diff --git a/src/Models/Operations/Source.php b/src/Models/Operations/Source.php new file mode 100644 index 0000000..6da9717 --- /dev/null +++ b/src/Models/Operations/Source.php @@ -0,0 +1,19 @@ + $policies * @param array<\ModerationApi\Models\Operations\SentimentInsight|\ModerationApi\Models\Operations\LanguageInsight|\ModerationApi\Models\Operations\CuriosityInsight|\ModerationApi\Models\Operations\RespectInsight|\ModerationApi\Models\Operations\PersonalStoryInsight|\ModerationApi\Models\Operations\CompassionInsight> $insights * @param \ModerationApi\Models\Operations\Meta $meta - * @param ?\ModerationApi\Models\Operations\Author $author + * @param ?\ModerationApi\Models\Operations\SubmitContentAuthor $author * @param ?\ModerationApi\Models\Operations\Casebook $casebook * @param ?array<\ModerationApi\Models\Operations\Error> $errors * @phpstan-pure */ - public function __construct(ContentResponse $content, Evaluation $evaluation, Recommendation $recommendation, array $policies, array $insights, Meta $meta, ?Author $author = null, ?Casebook $casebook = null, ?array $errors = null) + public function __construct(ContentResponse $content, Evaluation $evaluation, Recommendation $recommendation, array $policies, array $insights, Meta $meta, ?SubmitContentAuthor $author = null, ?Casebook $casebook = null, ?array $errors = null) { $this->content = $content; $this->evaluation = $evaluation; diff --git a/src/Models/Operations/TopAction.php b/src/Models/Operations/TopAction.php deleted file mode 100644 index a017a8e..0000000 --- a/src/Models/Operations/TopAction.php +++ /dev/null @@ -1,50 +0,0 @@ -actionId = $actionId; - $this->actionName = $actionName; - $this->count = $count; - } -} \ No newline at end of file diff --git a/src/Models/Operations/TopReviewer.php b/src/Models/Operations/TopReviewer.php index 9558e94..c9ef9fd 100644 --- a/src/Models/Operations/TopReviewer.php +++ b/src/Models/Operations/TopReviewer.php @@ -12,71 +12,39 @@ class TopReviewer { /** - * ID of the reviewer + * Number of items the reviewer resolved in the period. * - * @var string $userId - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('userId')] - public string $userId; - - /** - * Name of the reviewer - * - * @var string $name - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('name')] - public string $name; - - /** - * Number of items reviewed - * - * @var float $reviewCount + * @var int $reviewCount */ #[\Speakeasy\Serializer\Annotation\SerializedName('reviewCount')] - public float $reviewCount; - - /** - * Average review time in milliseconds - * - * @var float $averageTimePerReview - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('averageTimePerReview')] - public float $averageTimePerReview; + public int $reviewCount; /** - * Most common actions taken by this reviewer + * The user ID of the reviewer. `null` for items resolved with an API key. * - * @var array<\ModerationApi\Models\Operations\TopAction> $topActions + * @var ?string $userId */ - #[\Speakeasy\Serializer\Annotation\SerializedName('topActions')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\TopAction>')] - public array $topActions; + #[\Speakeasy\Serializer\Annotation\SerializedName('userId')] + public ?string $userId; /** - * Optional accuracy score based on review quality metrics + * The name of the reviewer. * - * @var ?float $accuracyScore + * @var ?string $name */ - #[\Speakeasy\Serializer\Annotation\SerializedName('accuracyScore')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?float $accuracyScore = null; + #[\Speakeasy\Serializer\Annotation\SerializedName('name')] + public ?string $name; /** - * @param string $userId - * @param string $name - * @param float $reviewCount - * @param float $averageTimePerReview - * @param array<\ModerationApi\Models\Operations\TopAction> $topActions - * @param ?float $accuracyScore + * @param int $reviewCount + * @param ?string $userId + * @param ?string $name * @phpstan-pure */ - public function __construct(string $userId, string $name, float $reviewCount, float $averageTimePerReview, array $topActions, ?float $accuracyScore = null) + public function __construct(int $reviewCount, ?string $userId = null, ?string $name = null) { + $this->reviewCount = $reviewCount; $this->userId = $userId; $this->name = $name; - $this->reviewCount = $reviewCount; - $this->averageTimePerReview = $averageTimePerReview; - $this->topActions = $topActions; - $this->accuracyScore = $accuracyScore; } } \ No newline at end of file diff --git a/src/Models/Operations/Totals.php b/src/Models/Operations/Totals.php new file mode 100644 index 0000000..64032f9 --- /dev/null +++ b/src/Models/Operations/Totals.php @@ -0,0 +1,111 @@ +requests = $requests; + $this->flagged = $flagged; + $this->flagRate = $flagRate; + $this->allowed = $allowed; + $this->rejected = $rejected; + $this->sentToReview = $sentToReview; + $this->handledAutomatically = $handledAutomatically; + $this->flaggedButAllowed = $flaggedButAllowed; + $this->distinctAuthors = $distinctAuthors; + } +} \ No newline at end of file diff --git a/src/Models/Operations/Trends.php b/src/Models/Operations/Trends.php index 08f7cb9..ca36793 100644 --- a/src/Models/Operations/Trends.php +++ b/src/Models/Operations/Trends.php @@ -12,7 +12,7 @@ class Trends { /** - * $dailyReviewCounts + * Resolved items per day. Days with no reviews are left out. * * @var array<\ModerationApi\Models\Operations\DailyReviewCount> $dailyReviewCounts */ @@ -20,23 +20,12 @@ class Trends #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\DailyReviewCount>')] public array $dailyReviewCounts; - /** - * $flaggedContentTrends - * - * @var array<\ModerationApi\Models\Operations\FlaggedContentTrend> $flaggedContentTrends - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('flaggedContentTrends')] - #[\Speakeasy\Serializer\Annotation\Type('array<\ModerationApi\Models\Operations\FlaggedContentTrend>')] - public array $flaggedContentTrends; - /** * @param array<\ModerationApi\Models\Operations\DailyReviewCount> $dailyReviewCounts - * @param array<\ModerationApi\Models\Operations\FlaggedContentTrend> $flaggedContentTrends * @phpstan-pure */ - public function __construct(array $dailyReviewCounts, array $flaggedContentTrends) + public function __construct(array $dailyReviewCounts) { $this->dailyReviewCounts = $dailyReviewCounts; - $this->flaggedContentTrends = $flaggedContentTrends; } } \ No newline at end of file diff --git a/src/Models/Operations/UnresolveQueueItemRequest.php b/src/Models/Operations/UnresolveQueueItemRequest.php index c48457e..5a75811 100644 --- a/src/Models/Operations/UnresolveQueueItemRequest.php +++ b/src/Models/Operations/UnresolveQueueItemRequest.php @@ -12,7 +12,7 @@ class UnresolveQueueItemRequest { /** - * The queue ID + * The queue ID. * * @var string $id */ @@ -20,7 +20,7 @@ class UnresolveQueueItemRequest public string $id; /** - * The item ID to unresolve + * The item ID to unresolve. * * @var string $itemId */ @@ -28,14 +28,7 @@ class UnresolveQueueItemRequest public string $itemId; /** - * - * @var \ModerationApi\Models\Operations\UnresolveQueueItemRequestBody $body - */ - #[SpeakeasyMetadata('request:mediaType=application/json')] - public UnresolveQueueItemRequestBody $body; - - /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ @@ -45,15 +38,13 @@ class UnresolveQueueItemRequest /** * @param string $id * @param string $itemId - * @param \ModerationApi\Models\Operations\UnresolveQueueItemRequestBody $body * @param ?string $projectId * @phpstan-pure */ - public function __construct(string $id, string $itemId, UnresolveQueueItemRequestBody $body, ?string $projectId = null) + public function __construct(string $id, string $itemId, ?string $projectId = null) { $this->id = $id; $this->itemId = $itemId; - $this->body = $body; $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Operations/UnresolveQueueItemRequestBody.php b/src/Models/Operations/UnresolveQueueItemRequestBody.php deleted file mode 100644 index cb180fb..0000000 --- a/src/Models/Operations/UnresolveQueueItemRequestBody.php +++ /dev/null @@ -1,31 +0,0 @@ -comment = $comment; - } -} \ No newline at end of file diff --git a/src/Models/Operations/UnresolveQueueItemResponseBody.php b/src/Models/Operations/UnresolveQueueItemResponseBody.php index 1544a53..5a99865 100644 --- a/src/Models/Operations/UnresolveQueueItemResponseBody.php +++ b/src/Models/Operations/UnresolveQueueItemResponseBody.php @@ -20,15 +20,16 @@ class UnresolveQueueItemResponseBody public bool $success; /** - * New status of the item + * `pending` waits for review. `resolved` is reviewed. * - * @var string $status + * @var \ModerationApi\Models\Operations\UnresolveQueueItemStatus $status */ #[\Speakeasy\Serializer\Annotation\SerializedName('status')] - public string $status; + #[\Speakeasy\Serializer\Annotation\Type('\ModerationApi\Models\Operations\UnresolveQueueItemStatus')] + public UnresolveQueueItemStatus $status; /** - * Timestamp when the item was unresolved + * When the item was unresolved (ISO 8601). * * @var string $unresolvedAt */ @@ -37,11 +38,11 @@ class UnresolveQueueItemResponseBody /** * @param bool $success - * @param string $status + * @param \ModerationApi\Models\Operations\UnresolveQueueItemStatus $status * @param string $unresolvedAt * @phpstan-pure */ - public function __construct(bool $success, string $status, string $unresolvedAt) + public function __construct(bool $success, UnresolveQueueItemStatus $status, string $unresolvedAt) { $this->success = $success; $this->status = $status; diff --git a/src/Models/Operations/ListQueueItemsStatus.php b/src/Models/Operations/UnresolveQueueItemStatus.php similarity index 69% rename from src/Models/Operations/ListQueueItemsStatus.php rename to src/Models/Operations/UnresolveQueueItemStatus.php index 3003922..64f3ac2 100644 --- a/src/Models/Operations/ListQueueItemsStatus.php +++ b/src/Models/Operations/UnresolveQueueItemStatus.php @@ -9,8 +9,8 @@ namespace ModerationApi\Models\Operations; -/** Status of the item */ -enum ListQueueItemsStatus: string +/** `pending` waits for review. `resolved` is reviewed. */ +enum UnresolveQueueItemStatus: string { case Pending = 'pending'; case Resolved = 'resolved'; diff --git a/src/Models/Operations/UpdateActionRequest.php b/src/Models/Operations/UpdateActionRequest.php index 7e0ef4e..20d2869 100644 --- a/src/Models/Operations/UpdateActionRequest.php +++ b/src/Models/Operations/UpdateActionRequest.php @@ -27,7 +27,7 @@ class UpdateActionRequest public UpdateActionRequestBody $body; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/UpdateAuthorRequest.php b/src/Models/Operations/UpdateAuthorRequest.php index 4494636..b31de32 100644 --- a/src/Models/Operations/UpdateAuthorRequest.php +++ b/src/Models/Operations/UpdateAuthorRequest.php @@ -27,7 +27,7 @@ class UpdateAuthorRequest public UpdateAuthorRequestBody $body; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/UpdateWebhookRequest.php b/src/Models/Operations/UpdateWebhookRequest.php index 674ae61..ff31c65 100644 --- a/src/Models/Operations/UpdateWebhookRequest.php +++ b/src/Models/Operations/UpdateWebhookRequest.php @@ -27,7 +27,7 @@ class UpdateWebhookRequest public UpdateWebhookRequestBody $body; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/UpdateWordlistRequest.php b/src/Models/Operations/UpdateWordlistRequest.php index 5249ce3..20a2cbd 100644 --- a/src/Models/Operations/UpdateWordlistRequest.php +++ b/src/Models/Operations/UpdateWordlistRequest.php @@ -27,7 +27,7 @@ class UpdateWordlistRequest public UpdateWordlistRequestBody $body; /** - * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. + * The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error. * * @var ?string $projectId */ diff --git a/src/Models/Operations/UpdateWordlistRequestBody.php b/src/Models/Operations/UpdateWordlistRequestBody.php index 1f90417..d76f438 100644 --- a/src/Models/Operations/UpdateWordlistRequestBody.php +++ b/src/Models/Operations/UpdateWordlistRequestBody.php @@ -39,7 +39,7 @@ class UpdateWordlistRequestBody public ?string $description = null; /** - * 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. * * @var ?array $words */ diff --git a/src/Models/Operations/Volume.php b/src/Models/Operations/Volume.php new file mode 100644 index 0000000..bc501e7 --- /dev/null +++ b/src/Models/Operations/Volume.php @@ -0,0 +1,70 @@ +start = $start; + $this->requests = $requests; + $this->flagged = $flagged; + $this->rejected = $rejected; + $this->sentToReview = $sentToReview; + } +} \ No newline at end of file diff --git a/src/Models/Operations/WithinUnit.php b/src/Models/Operations/WithinUnit.php deleted file mode 100644 index 644daca..0000000 --- a/src/Models/Operations/WithinUnit.php +++ /dev/null @@ -1,20 +0,0 @@ -analytics = new Analytics($this->sdkConfiguration); $this->authors = new Authors($this->sdkConfiguration); + $this->feedback = new Feedback($this->sdkConfiguration); $this->queue = new Queue($this->sdkConfiguration); $this->actions = new Actions($this->sdkConfiguration); $this->webhooks = new Webhooks($this->sdkConfiguration); diff --git a/src/Projects.php b/src/Projects.php index ff19bc5..7ed8692 100644 --- a/src/Projects.php +++ b/src/Projects.php @@ -16,12 +16,15 @@ class Projects { private SDKConfiguration $sdkConfiguration; + public ApiKeys $apiKeys; + /** * @param SDKConfiguration $sdkConfig */ public function __construct(public SDKConfiguration $sdkConfig) { $this->sdkConfiguration = $sdkConfig; + $this->apiKeys = new ApiKeys($this->sdkConfiguration); } /** * @param string $baseUrl diff --git a/src/Queue.php b/src/Queue.php index ef3fad1..477702f 100644 --- a/src/Queue.php +++ b/src/Queue.php @@ -50,7 +50,7 @@ public function getUrl(string $baseUrl, array $urlVariables): string /** * 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. * * @param string $id * @param ?string $projectId @@ -193,7 +193,7 @@ public function retrieve(string $id, ?string $projectId = null, ?Options $option /** * 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. * * @param string $id * @param ?int $withinDays @@ -338,4 +338,205 @@ public function getStats(string $id, ?int $withinDays = null, ?string $projectId } } + /** + * 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}`. + * + * @param ?int $page + * @param ?int $pageSize + * @param ?string $projectId + * @return \ModerationApi\Models\Operations\ListQueuesResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + private function listIndividual(?int $page = null, ?int $pageSize = null, ?string $projectId = null, ?Options $options = null): Operations\ListQueuesResponse + { + $request = new Operations\ListQueuesRequest( + page: $page, + pageSize: $pageSize, + projectId: $projectId, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/queue'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + + $qp = Utils\Utils::getQueryParams(Operations\ListQueuesRequest::class, $request, $urlOverride); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'listQueues', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\ListQueuesResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\ListQueuesResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + $sdk = $this; + + $response->next = function () use ($sdk, $request, $responseData): ?Operations\ListQueuesResponse { + $page = $request != null && $request->page != null ? $request->page : 1; + $nextPage = $page + 1; + $jsonObject = new \JsonPath\JsonObject($responseData); + $numPages = $jsonObject->get('$.pagination.totalPages'); + if ($numPages == null || $numPages[0] <= $page) { + return null; + } + if (! $responseData) { + return null; + } + $jsonObject = new \JsonPath\JsonObject($responseData); + $results = $jsonObject->get('$.data'); + + if (is_array($results)) { + $results = $results[0]; + } + if (count($results) === 0) { + return null; + } + $limit = $request != null && $request->pageSize != null ? $request->pageSize : 20; + if (count($results) < $limit) { + return null; + } + + return $sdk->listIndividual( + page: $nextPage, + pageSize: $request != null ? $request->pageSize : null, + projectId: $request != null ? $request->projectId : null, + ); + }; + + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['403'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\PermissionDeniedError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['404'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\NotFoundError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['500'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + /** + * 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}`. + * + * @param ?int $page + * @param ?int $pageSize + * @param ?string $projectId + * @return \Generator<\ModerationApi\Models\Operations\ListQueuesResponse> + * @throws \ModerationApi\Models\Errors\APIException + */ + public function list(?int $page = null, ?int $pageSize = null, ?string $projectId = null, ?Options $options = null): \Generator + { + $res = $this->listIndividual($page, $pageSize, $projectId, $options); + while ($res !== null) { + yield $res; + $res = $res->next($res); + } + } + } \ No newline at end of file diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index cdc315e..a55fb60 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -26,11 +26,11 @@ class SDKConfiguration public string $openapiDocVersion = '1.1.0'; - public string $sdkVersion = '1.1.1'; + public string $sdkVersion = '1.2.0'; public string $genVersion = 'internal'; - public string $userAgent = 'speakeasy-sdk/php 1.1.1 internal 1.1.0 moderation-api/sdk-php'; + public string $userAgent = 'speakeasy-sdk/php 1.2.0 internal 1.1.0 moderation-api/sdk-php'; public ?RetryConfig $retryConfig = null; diff --git a/src/Wordlist.php b/src/Wordlist.php index a5aab9b..20cf140 100644 --- a/src/Wordlist.php +++ b/src/Wordlist.php @@ -47,6 +47,118 @@ public function getUrl(string $baseUrl, array $urlVariables): string return Utils\Utils::templateUrl($baseUrl, $urlVariables); } + /** + * 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. + * + * @param \ModerationApi\Models\Operations\CreateWordlistRequestBody $body + * @param ?string $projectId + * @return \ModerationApi\Models\Operations\CreateWordlistResponse + * @throws \ModerationApi\Models\Errors\APIException + */ + public function create(Operations\CreateWordlistRequestBody $body, ?string $projectId = null, ?Options $options = null): Operations\CreateWordlistResponse + { + $request = new Operations\CreateWordlistRequest( + body: $body, + projectId: $projectId, + ); + $baseUrl = $this->sdkConfiguration->getTemplatedServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/wordlist'); + $urlOverride = null; + $httpOptions = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'body', 'json'); + if ($body === null) { + throw new \Exception('Request body is required'); + } + $httpOptions = array_merge_recursive($httpOptions, $body); + $httpOptions = array_merge_recursive($httpOptions, Utils\Utils::getHeaders($request)); + if (! array_key_exists('headers', $httpOptions)) { + $httpOptions['headers'] = []; + } + $httpOptions['headers']['Accept'] = 'application/json'; + $httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + $hookContext = new HookContext($this->sdkConfiguration, $baseUrl, 'createWordlist', null, $this->sdkConfiguration->securitySource); + $httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest); + $httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions); + $httpRequest = Utils\Utils::removeHeaders($httpRequest); + try { + $httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions); + } catch (\GuzzleHttp\Exception\GuzzleException $error) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error); + $httpResponse = $res; + } + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + if (Utils\Utils::matchStatusCodes($httpResponse->getStatusCode(), ['4XX', '5XX'])) { + $res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null); + $httpResponse = $res; + } + + $statusCode = $httpResponse->getStatusCode(); + if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Operations\CreateWordlistResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreateWordlistResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['400'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\BadRequestError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['401'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\AuthenticationError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['429'])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse); + + $serializer = Utils\JSON::createSerializer(); + $responseData = (string) $httpResponse->getBody(); + $obj = $serializer->deserialize($responseData, '\ModerationApi\Models\Errors\RateLimitError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj->rawResponse = $httpResponse; + throw $obj->toException(); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['4XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) { + throw new \ModerationApi\Models\Errors\APIException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \ModerationApi\Models\Errors\APIException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + /** * Get wordlist * @@ -537,7 +649,7 @@ public function list(?int $page = null, ?int $pageSize = null, ?string $projectI /** * 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. * * @param \ModerationApi\Models\Operations\UpdateWordlistRequestBody $body * @param string $id