moderation_api 1.2.2 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ignore +2 -0
- data/CHANGELOG.md +36 -0
- data/README.md +198 -62
- data/SECURITY.md +27 -0
- data/lib/moderation_api/client.rb +98 -0
- data/lib/moderation_api/errors.rb +228 -0
- data/lib/moderation_api/file_part.rb +58 -0
- data/lib/moderation_api/internal/transport/base_client.rb +577 -0
- data/lib/moderation_api/internal/transport/pooled_net_requester.rb +208 -0
- data/lib/moderation_api/internal/type/array_of.rb +168 -0
- data/lib/moderation_api/internal/type/base_model.rb +534 -0
- data/lib/moderation_api/internal/type/base_page.rb +55 -0
- data/lib/moderation_api/internal/type/boolean.rb +77 -0
- data/lib/moderation_api/internal/type/converter.rb +327 -0
- data/lib/moderation_api/internal/type/enum.rb +131 -0
- data/lib/moderation_api/internal/type/file_input.rb +111 -0
- data/lib/moderation_api/internal/type/hash_of.rb +188 -0
- data/lib/moderation_api/internal/type/request_parameters.rb +42 -0
- data/lib/moderation_api/internal/type/union.rb +243 -0
- data/lib/moderation_api/internal/type/unknown.rb +81 -0
- data/lib/moderation_api/internal/util.rb +915 -0
- data/lib/moderation_api/internal.rb +20 -0
- data/lib/moderation_api/models/account_list_params.rb +14 -0
- data/lib/moderation_api/models/account_list_response.rb +68 -0
- data/lib/moderation_api/models/action_create_params.rb +217 -0
- data/lib/moderation_api/models/action_create_response.rb +188 -0
- data/lib/moderation_api/models/action_delete_params.rb +14 -0
- data/lib/moderation_api/models/action_delete_response.rb +25 -0
- data/lib/moderation_api/models/action_list_params.rb +20 -0
- data/lib/moderation_api/models/action_list_response.rb +247 -0
- data/lib/moderation_api/models/action_retrieve_params.rb +14 -0
- data/lib/moderation_api/models/action_retrieve_response.rb +244 -0
- data/lib/moderation_api/models/action_update_params.rb +217 -0
- data/lib/moderation_api/models/action_update_response.rb +188 -0
- data/lib/moderation_api/models/actions/execute_execute_by_id_params.rb +48 -0
- data/lib/moderation_api/models/actions/execute_execute_by_id_response.rb +35 -0
- data/lib/moderation_api/models/actions/execute_execute_params.rb +64 -0
- data/lib/moderation_api/models/actions/execute_execute_response.rb +21 -0
- data/lib/moderation_api/models/auth_create_params.rb +14 -0
- data/lib/moderation_api/models/auth_create_response.rb +33 -0
- data/lib/moderation_api/models/auth_retrieve_params.rb +14 -0
- data/lib/moderation_api/models/auth_retrieve_response.rb +25 -0
- data/lib/moderation_api/models/author_create_params.rb +127 -0
- data/lib/moderation_api/models/author_create_response.rb +272 -0
- data/lib/moderation_api/models/author_delete_params.rb +14 -0
- data/lib/moderation_api/models/author_delete_response.rb +16 -0
- data/lib/moderation_api/models/author_list_params.rb +93 -0
- data/lib/moderation_api/models/author_list_response.rb +326 -0
- data/lib/moderation_api/models/author_retrieve_params.rb +14 -0
- data/lib/moderation_api/models/author_retrieve_response.rb +274 -0
- data/lib/moderation_api/models/author_update_params.rb +119 -0
- data/lib/moderation_api/models/author_update_response.rb +272 -0
- data/lib/moderation_api/models/content_submit_params.rb +871 -0
- data/lib/moderation_api/models/content_submit_response.rb +742 -0
- data/lib/moderation_api/models/queue/item_list_params.rb +118 -0
- data/lib/moderation_api/models/queue/item_list_response.rb +235 -0
- data/lib/moderation_api/models/queue/item_resolve_params.rb +32 -0
- data/lib/moderation_api/models/queue/item_resolve_response.rb +34 -0
- data/lib/moderation_api/models/queue/item_unresolve_params.rb +32 -0
- data/lib/moderation_api/models/queue/item_unresolve_response.rb +34 -0
- data/lib/moderation_api/models/queue_get_stats_params.rb +22 -0
- data/lib/moderation_api/models/queue_get_stats_response.rb +251 -0
- data/lib/moderation_api/models/queue_retrieve_params.rb +14 -0
- data/lib/moderation_api/models/queue_retrieve_response.rb +190 -0
- data/lib/moderation_api/models/wordlist/word_add_params.rb +24 -0
- data/lib/moderation_api/models/wordlist/word_add_response.rb +35 -0
- data/lib/moderation_api/models/wordlist/word_remove_params.rb +24 -0
- data/lib/moderation_api/models/wordlist/word_remove_response.rb +35 -0
- data/lib/moderation_api/models/wordlist_get_embedding_status_params.rb +14 -0
- data/lib/moderation_api/models/wordlist_get_embedding_status_response.rb +35 -0
- data/lib/moderation_api/models/wordlist_list_params.rb +14 -0
- data/lib/moderation_api/models/wordlist_list_response.rb +52 -0
- data/lib/moderation_api/models/wordlist_retrieve_params.rb +14 -0
- data/lib/moderation_api/models/wordlist_retrieve_response.rb +65 -0
- data/lib/moderation_api/models/wordlist_update_params.rb +58 -0
- data/lib/moderation_api/models/wordlist_update_response.rb +65 -0
- data/lib/moderation_api/models.rb +90 -0
- data/lib/moderation_api/request_options.rb +78 -0
- data/lib/moderation_api/resources/account.rb +32 -0
- data/lib/moderation_api/resources/actions/execute.rb +80 -0
- data/lib/moderation_api/resources/actions.rb +175 -0
- data/lib/moderation_api/resources/auth.rb +50 -0
- data/lib/moderation_api/resources/authors.rb +179 -0
- data/lib/moderation_api/resources/content.rb +53 -0
- data/lib/moderation_api/resources/queue/items.rb +131 -0
- data/lib/moderation_api/resources/queue.rb +63 -0
- data/lib/moderation_api/resources/wordlist/words.rb +64 -0
- data/lib/moderation_api/resources/wordlist.rb +111 -0
- data/lib/moderation_api/version.rb +3 -13
- data/lib/moderation_api.rb +115 -89
- data/manifest.yaml +17 -0
- data/rbi/moderation_api/client.rbi +67 -0
- data/rbi/moderation_api/errors.rbi +205 -0
- data/rbi/moderation_api/file_part.rbi +37 -0
- data/rbi/moderation_api/internal/transport/base_client.rbi +305 -0
- data/rbi/moderation_api/internal/transport/pooled_net_requester.rbi +84 -0
- data/rbi/moderation_api/internal/type/array_of.rbi +104 -0
- data/rbi/moderation_api/internal/type/base_model.rbi +314 -0
- data/rbi/moderation_api/internal/type/base_page.rbi +43 -0
- data/rbi/moderation_api/internal/type/boolean.rbi +58 -0
- data/rbi/moderation_api/internal/type/converter.rbi +225 -0
- data/rbi/moderation_api/internal/type/enum.rbi +82 -0
- data/rbi/moderation_api/internal/type/file_input.rbi +59 -0
- data/rbi/moderation_api/internal/type/hash_of.rbi +104 -0
- data/rbi/moderation_api/internal/type/request_parameters.rbi +31 -0
- data/rbi/moderation_api/internal/type/union.rbi +128 -0
- data/rbi/moderation_api/internal/type/unknown.rbi +58 -0
- data/rbi/moderation_api/internal/util.rbi +487 -0
- data/rbi/moderation_api/internal.rbi +18 -0
- data/rbi/moderation_api/models/account_list_params.rbi +32 -0
- data/rbi/moderation_api/models/account_list_response.rbi +115 -0
- data/rbi/moderation_api/models/action_create_params.rbi +433 -0
- data/rbi/moderation_api/models/action_create_response.rbi +354 -0
- data/rbi/moderation_api/models/action_delete_params.rbi +32 -0
- data/rbi/moderation_api/models/action_delete_response.rbi +36 -0
- data/rbi/moderation_api/models/action_list_params.rbi +41 -0
- data/rbi/moderation_api/models/action_list_response.rbi +450 -0
- data/rbi/moderation_api/models/action_retrieve_params.rbi +32 -0
- data/rbi/moderation_api/models/action_retrieve_response.rbi +442 -0
- data/rbi/moderation_api/models/action_update_params.rbi +436 -0
- data/rbi/moderation_api/models/action_update_response.rbi +354 -0
- data/rbi/moderation_api/models/actions/execute_execute_by_id_params.rbi +84 -0
- data/rbi/moderation_api/models/actions/execute_execute_by_id_response.rbi +54 -0
- data/rbi/moderation_api/models/actions/execute_execute_params.rbi +103 -0
- data/rbi/moderation_api/models/actions/execute_execute_response.rbi +33 -0
- data/rbi/moderation_api/models/auth_create_params.rbi +32 -0
- data/rbi/moderation_api/models/auth_create_response.rbi +48 -0
- data/rbi/moderation_api/models/auth_retrieve_params.rbi +32 -0
- data/rbi/moderation_api/models/auth_retrieve_response.rbi +36 -0
- data/rbi/moderation_api/models/author_create_params.rbi +184 -0
- data/rbi/moderation_api/models/author_create_response.rbi +467 -0
- data/rbi/moderation_api/models/author_delete_params.rbi +32 -0
- data/rbi/moderation_api/models/author_delete_response.rbi +26 -0
- data/rbi/moderation_api/models/author_list_params.rbi +213 -0
- data/rbi/moderation_api/models/author_list_response.rbi +593 -0
- data/rbi/moderation_api/models/author_retrieve_params.rbi +32 -0
- data/rbi/moderation_api/models/author_retrieve_response.rbi +472 -0
- data/rbi/moderation_api/models/author_update_params.rbi +176 -0
- data/rbi/moderation_api/models/author_update_response.rbi +467 -0
- data/rbi/moderation_api/models/content_submit_params.rbi +1641 -0
- data/rbi/moderation_api/models/content_submit_response.rbi +1456 -0
- data/rbi/moderation_api/models/queue/item_list_params.rbi +237 -0
- data/rbi/moderation_api/models/queue/item_list_response.rbi +440 -0
- data/rbi/moderation_api/models/queue/item_resolve_params.rbi +59 -0
- data/rbi/moderation_api/models/queue/item_resolve_response.rbi +55 -0
- data/rbi/moderation_api/models/queue/item_unresolve_params.rbi +59 -0
- data/rbi/moderation_api/models/queue/item_unresolve_response.rbi +52 -0
- data/rbi/moderation_api/models/queue_get_stats_params.rbi +49 -0
- data/rbi/moderation_api/models/queue_get_stats_response.rbi +466 -0
- data/rbi/moderation_api/models/queue_retrieve_params.rbi +32 -0
- data/rbi/moderation_api/models/queue_retrieve_response.rbi +411 -0
- data/rbi/moderation_api/models/wordlist/word_add_params.rbi +48 -0
- data/rbi/moderation_api/models/wordlist/word_add_response.rbi +58 -0
- data/rbi/moderation_api/models/wordlist/word_remove_params.rbi +48 -0
- data/rbi/moderation_api/models/wordlist/word_remove_response.rbi +58 -0
- data/rbi/moderation_api/models/wordlist_get_embedding_status_params.rbi +32 -0
- data/rbi/moderation_api/models/wordlist_get_embedding_status_response.rbi +53 -0
- data/rbi/moderation_api/models/wordlist_list_params.rbi +32 -0
- data/rbi/moderation_api/models/wordlist_list_response.rbi +80 -0
- data/rbi/moderation_api/models/wordlist_retrieve_params.rbi +32 -0
- data/rbi/moderation_api/models/wordlist_retrieve_response.rbi +88 -0
- data/rbi/moderation_api/models/wordlist_update_params.rbi +95 -0
- data/rbi/moderation_api/models/wordlist_update_response.rbi +88 -0
- data/rbi/moderation_api/models.rbi +50 -0
- data/rbi/moderation_api/request_options.rbi +59 -0
- data/rbi/moderation_api/resources/account.rbi +21 -0
- data/rbi/moderation_api/resources/actions/execute.rbi +69 -0
- data/rbi/moderation_api/resources/actions.rbi +164 -0
- data/rbi/moderation_api/resources/auth.rbi +28 -0
- data/rbi/moderation_api/resources/authors.rbi +143 -0
- data/rbi/moderation_api/resources/content.rbi +84 -0
- data/rbi/moderation_api/resources/queue/items.rbi +95 -0
- data/rbi/moderation_api/resources/queue.rbi +47 -0
- data/rbi/moderation_api/resources/wordlist/words.rbi +48 -0
- data/rbi/moderation_api/resources/wordlist.rbi +82 -0
- data/rbi/moderation_api/version.rbi +5 -0
- data/sig/moderation_api/client.rbs +38 -0
- data/sig/moderation_api/errors.rbs +117 -0
- data/sig/moderation_api/file_part.rbs +21 -0
- data/sig/moderation_api/internal/transport/base_client.rbs +133 -0
- data/sig/moderation_api/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/moderation_api/internal/type/array_of.rbs +48 -0
- data/sig/moderation_api/internal/type/base_model.rbs +104 -0
- data/sig/moderation_api/internal/type/base_page.rbs +24 -0
- data/sig/moderation_api/internal/type/boolean.rbs +26 -0
- data/sig/moderation_api/internal/type/converter.rbs +79 -0
- data/sig/moderation_api/internal/type/enum.rbs +32 -0
- data/sig/moderation_api/internal/type/file_input.rbs +25 -0
- data/sig/moderation_api/internal/type/hash_of.rbs +48 -0
- data/sig/moderation_api/internal/type/request_parameters.rbs +19 -0
- data/sig/moderation_api/internal/type/union.rbs +52 -0
- data/sig/moderation_api/internal/type/unknown.rbs +26 -0
- data/sig/moderation_api/internal/util.rbs +185 -0
- data/sig/moderation_api/internal.rbs +10 -0
- data/sig/moderation_api/models/account_list_params.rbs +15 -0
- data/sig/moderation_api/models/account_list_response.rbs +56 -0
- data/sig/moderation_api/models/action_create_params.rbs +195 -0
- data/sig/moderation_api/models/action_create_response.rbs +143 -0
- data/sig/moderation_api/models/action_delete_params.rbs +15 -0
- data/sig/moderation_api/models/action_delete_response.rbs +15 -0
- data/sig/moderation_api/models/action_list_params.rbs +25 -0
- data/sig/moderation_api/models/action_list_response.rbs +190 -0
- data/sig/moderation_api/models/action_retrieve_params.rbs +15 -0
- data/sig/moderation_api/models/action_retrieve_response.rbs +185 -0
- data/sig/moderation_api/models/action_update_params.rbs +197 -0
- data/sig/moderation_api/models/action_update_response.rbs +143 -0
- data/sig/moderation_api/models/actions/execute_execute_by_id_params.rbs +51 -0
- data/sig/moderation_api/models/actions/execute_execute_by_id_response.rbs +28 -0
- data/sig/moderation_api/models/actions/execute_execute_params.rbs +63 -0
- data/sig/moderation_api/models/actions/execute_execute_response.rbs +15 -0
- data/sig/moderation_api/models/auth_create_params.rbs +15 -0
- data/sig/moderation_api/models/auth_create_response.rbs +18 -0
- data/sig/moderation_api/models/auth_retrieve_params.rbs +15 -0
- data/sig/moderation_api/models/auth_retrieve_response.rbs +15 -0
- data/sig/moderation_api/models/author_create_params.rbs +106 -0
- data/sig/moderation_api/models/author_create_response.rbs +195 -0
- data/sig/moderation_api/models/author_delete_params.rbs +15 -0
- data/sig/moderation_api/models/author_delete_response.rbs +13 -0
- data/sig/moderation_api/models/author_list_params.rbs +110 -0
- data/sig/moderation_api/models/author_list_response.rbs +254 -0
- data/sig/moderation_api/models/author_retrieve_params.rbs +15 -0
- data/sig/moderation_api/models/author_retrieve_response.rbs +195 -0
- data/sig/moderation_api/models/author_update_params.rbs +101 -0
- data/sig/moderation_api/models/author_update_response.rbs +195 -0
- data/sig/moderation_api/models/content_submit_params.rbs +733 -0
- data/sig/moderation_api/models/content_submit_response.rbs +599 -0
- data/sig/moderation_api/models/queue/item_list_params.rbs +127 -0
- data/sig/moderation_api/models/queue/item_list_response.rbs +209 -0
- data/sig/moderation_api/models/queue/item_resolve_params.rbs +32 -0
- data/sig/moderation_api/models/queue/item_resolve_response.rbs +26 -0
- data/sig/moderation_api/models/queue/item_unresolve_params.rbs +32 -0
- data/sig/moderation_api/models/queue/item_unresolve_response.rbs +24 -0
- data/sig/moderation_api/models/queue_get_stats_params.rbs +26 -0
- data/sig/moderation_api/models/queue_get_stats_response.rbs +207 -0
- data/sig/moderation_api/models/queue_retrieve_params.rbs +15 -0
- data/sig/moderation_api/models/queue_retrieve_response.rbs +207 -0
- data/sig/moderation_api/models/wordlist/word_add_params.rbs +26 -0
- data/sig/moderation_api/models/wordlist/word_add_response.rbs +28 -0
- data/sig/moderation_api/models/wordlist/word_remove_params.rbs +26 -0
- data/sig/moderation_api/models/wordlist/word_remove_response.rbs +32 -0
- data/sig/moderation_api/models/wordlist_get_embedding_status_params.rbs +15 -0
- data/sig/moderation_api/models/wordlist_get_embedding_status_response.rbs +26 -0
- data/sig/moderation_api/models/wordlist_list_params.rbs +15 -0
- data/sig/moderation_api/models/wordlist_list_response.rbs +45 -0
- data/sig/moderation_api/models/wordlist_retrieve_params.rbs +15 -0
- data/sig/moderation_api/models/wordlist_retrieve_response.rbs +50 -0
- data/sig/moderation_api/models/wordlist_update_params.rbs +56 -0
- data/sig/moderation_api/models/wordlist_update_response.rbs +50 -0
- data/sig/moderation_api/models.rbs +47 -0
- data/sig/moderation_api/request_options.rbs +36 -0
- data/sig/moderation_api/resources/account.rbs +11 -0
- data/sig/moderation_api/resources/actions/execute.rbs +28 -0
- data/sig/moderation_api/resources/actions.rbs +57 -0
- data/sig/moderation_api/resources/auth.rbs +15 -0
- data/sig/moderation_api/resources/authors.rbs +54 -0
- data/sig/moderation_api/resources/content.rbs +20 -0
- data/sig/moderation_api/resources/queue/items.rbs +39 -0
- data/sig/moderation_api/resources/queue.rbs +20 -0
- data/sig/moderation_api/resources/wordlist/words.rbs +21 -0
- data/sig/moderation_api/resources/wordlist.rbs +33 -0
- data/sig/moderation_api/version.rbs +3 -0
- metadata +277 -302
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -87
- data/Rakefile +0 -10
- data/docs/AccountApi.md +0 -74
- data/docs/AccountGet200Response.md +0 -26
- data/docs/AccountGet200ResponseCurrentProject.md +0 -20
- data/docs/ActionsCreateRequest.md +0 -36
- data/docs/ActionsCreateRequestWebhooksInner.md +0 -24
- data/docs/ActionsDelete200Response.md +0 -20
- data/docs/ActionsExecute200Response.md +0 -22
- data/docs/ActionsExecuteDeprecatedRequest.md +0 -22
- data/docs/ActionsExecuteRequest.md +0 -24
- data/docs/ActionsGet200Response.md +0 -40
- data/docs/ActionsGet200ResponseWebhooksInner.md +0 -26
- data/docs/ActionsList200ResponseInner.md +0 -38
- data/docs/ActionsList200ResponseInnerPossibleValuesInner.md +0 -18
- data/docs/ActionsList400Response.md +0 -22
- data/docs/ActionsList400ResponseIssuesInner.md +0 -18
- data/docs/ActionsUpdateRequest.md +0 -36
- data/docs/ModerateApi.md +0 -357
- data/docs/ModerationAudioRequest.md +0 -28
- data/docs/ModerationImage200Response.md +0 -28
- data/docs/ModerationImage200ResponseLabelsInner.md +0 -20
- data/docs/ModerationImageRequest.md +0 -28
- data/docs/ModerationObject200Response.md +0 -36
- data/docs/ModerationObject200ResponseAllOfEntitiesInner.md +0 -22
- data/docs/ModerationObject200ResponseAllOfFieldsInner.md +0 -22
- data/docs/ModerationObject200ResponseAllOfLabelsInner.md +0 -22
- data/docs/ModerationObjectRequest.md +0 -28
- data/docs/ModerationObjectRequestValue.md +0 -20
- data/docs/ModerationObjectRequestValueDataValue.md +0 -22
- data/docs/ModerationText200Response.md +0 -64
- data/docs/ModerationText200ResponseAllOfAddress.md +0 -28
- data/docs/ModerationText200ResponseAllOfEmail.md +0 -28
- data/docs/ModerationText200ResponseAllOfName.md +0 -28
- data/docs/ModerationText200ResponseAllOfNsfw.md +0 -26
- data/docs/ModerationText200ResponseAllOfNsfwLabelScores.md +0 -22
- data/docs/ModerationText200ResponseAllOfPhone.md +0 -28
- data/docs/ModerationText200ResponseAllOfProfanity.md +0 -28
- data/docs/ModerationText200ResponseAllOfPropriety.md +0 -26
- data/docs/ModerationText200ResponseAllOfProprietyLabelScores.md +0 -22
- data/docs/ModerationText200ResponseAllOfQuality.md +0 -26
- data/docs/ModerationText200ResponseAllOfQualityLabelScores.md +0 -24
- data/docs/ModerationText200ResponseAllOfRequest.md +0 -20
- data/docs/ModerationText200ResponseAllOfSensitive.md +0 -28
- data/docs/ModerationText200ResponseAllOfSentiment.md +0 -26
- data/docs/ModerationText200ResponseAllOfSentimentLabelScores.md +0 -22
- data/docs/ModerationText200ResponseAllOfToxicity.md +0 -26
- data/docs/ModerationText200ResponseAllOfToxicityLabelScores.md +0 -30
- data/docs/ModerationText200ResponseAllOfUrl.md +0 -28
- data/docs/ModerationText200ResponseAllOfUsername.md +0 -28
- data/docs/ModerationText200ResponseAllOfWordlist.md +0 -28
- data/docs/ModerationText200ResponseAllOfWordlistsInner.md +0 -36
- data/docs/ModerationTextRequest.md +0 -28
- data/docs/ModerationVideo200Response.md +0 -24
- data/docs/ModerationVideoRequest.md +0 -28
- data/docs/QueueActionsApi.md +0 -503
- data/git_push.sh +0 -57
- data/lib/moderation_api/api/account_api.rb +0 -79
- data/lib/moderation_api/api/moderate_api.rb +0 -362
- data/lib/moderation_api/api/queue_actions_api.rb +0 -492
- data/lib/moderation_api/api_client.rb +0 -437
- data/lib/moderation_api/api_error.rb +0 -58
- data/lib/moderation_api/configuration.rb +0 -392
- data/lib/moderation_api/models/account_get200_response.rb +0 -278
- data/lib/moderation_api/models/account_get200_response_current_project.rb +0 -237
- data/lib/moderation_api/models/actions_create_request.rb +0 -374
- data/lib/moderation_api/models/actions_create_request_webhooks_inner.rb +0 -260
- data/lib/moderation_api/models/actions_delete200_response.rb +0 -239
- data/lib/moderation_api/models/actions_execute200_response.rb +0 -258
- data/lib/moderation_api/models/actions_execute_deprecated_request.rb +0 -244
- data/lib/moderation_api/models/actions_execute_request.rb +0 -261
- data/lib/moderation_api/models/actions_get200_response.rb +0 -408
- data/lib/moderation_api/models/actions_get200_response_webhooks_inner.rb +0 -278
- data/lib/moderation_api/models/actions_list200_response_inner.rb +0 -396
- data/lib/moderation_api/models/actions_list200_response_inner_possible_values_inner.rb +0 -222
- data/lib/moderation_api/models/actions_list400_response.rb +0 -248
- data/lib/moderation_api/models/actions_list400_response_issues_inner.rb +0 -221
- data/lib/moderation_api/models/actions_update_request.rb +0 -367
- data/lib/moderation_api/models/moderation_audio_request.rb +0 -302
- data/lib/moderation_api/models/moderation_image200_response.rb +0 -296
- data/lib/moderation_api/models/moderation_image200_response_labels_inner.rb +0 -301
- data/lib/moderation_api/models/moderation_image_request.rb +0 -302
- data/lib/moderation_api/models/moderation_object200_response.rb +0 -368
- data/lib/moderation_api/models/moderation_object200_response_all_of_entities_inner.rb +0 -251
- data/lib/moderation_api/models/moderation_object200_response_all_of_fields_inner.rb +0 -258
- data/lib/moderation_api/models/moderation_object200_response_all_of_labels_inner.rb +0 -284
- data/lib/moderation_api/models/moderation_object_request.rb +0 -301
- data/lib/moderation_api/models/moderation_object_request_value.rb +0 -275
- data/lib/moderation_api/models/moderation_object_request_value_data_value.rb +0 -285
- data/lib/moderation_api/models/moderation_text200_response.rb +0 -488
- data/lib/moderation_api/models/moderation_text200_response_all_of_address.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_email.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_name.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_nsfw.rb +0 -255
- data/lib/moderation_api/models/moderation_text200_response_all_of_nsfw_label_scores.rb +0 -235
- data/lib/moderation_api/models/moderation_text200_response_all_of_phone.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_profanity.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_propriety.rb +0 -255
- data/lib/moderation_api/models/moderation_text200_response_all_of_propriety_label_scores.rb +0 -235
- data/lib/moderation_api/models/moderation_text200_response_all_of_quality.rb +0 -255
- data/lib/moderation_api/models/moderation_text200_response_all_of_quality_label_scores.rb +0 -245
- data/lib/moderation_api/models/moderation_text200_response_all_of_request.rb +0 -240
- data/lib/moderation_api/models/moderation_text200_response_all_of_sensitive.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_sentiment.rb +0 -255
- data/lib/moderation_api/models/moderation_text200_response_all_of_sentiment_label_scores.rb +0 -235
- data/lib/moderation_api/models/moderation_text200_response_all_of_toxicity.rb +0 -262
- data/lib/moderation_api/models/moderation_text200_response_all_of_toxicity_label_scores.rb +0 -275
- data/lib/moderation_api/models/moderation_text200_response_all_of_url.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_username.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_wordlist.rb +0 -303
- data/lib/moderation_api/models/moderation_text200_response_all_of_wordlists_inner.rb +0 -377
- data/lib/moderation_api/models/moderation_text_request.rb +0 -330
- data/lib/moderation_api/models/moderation_video200_response.rb +0 -265
- data/lib/moderation_api/models/moderation_video_request.rb +0 -302
- data/lib/moderation_api/webhook.rb +0 -41
- data/moderation_api-1.2.0.gem +0 -0
- data/moderation_api-1.2.1.gem +0 -0
- data/moderation_api.gemspec +0 -45
- data/ruby_config.yaml +0 -30
- data/spec/api/account_api_spec.rb +0 -46
- data/spec/api/moderate_api_spec.rb +0 -95
- data/spec/api/queue_actions_api_spec.rb +0 -121
- data/spec/models/account_get200_response_current_project_spec.rb +0 -42
- data/spec/models/account_get200_response_spec.rb +0 -60
- data/spec/models/actions_create_request_spec.rb +0 -98
- data/spec/models/actions_create_request_webhooks_inner_spec.rb +0 -54
- data/spec/models/actions_delete200_response_spec.rb +0 -42
- data/spec/models/actions_execute200_response_spec.rb +0 -48
- data/spec/models/actions_execute_deprecated_request_spec.rb +0 -48
- data/spec/models/actions_execute_request_spec.rb +0 -54
- data/spec/models/actions_get200_response_spec.rb +0 -110
- data/spec/models/actions_get200_response_webhooks_inner_spec.rb +0 -60
- data/spec/models/actions_list200_response_inner_possible_values_inner_spec.rb +0 -36
- data/spec/models/actions_list200_response_inner_spec.rb +0 -104
- data/spec/models/actions_list400_response_issues_inner_spec.rb +0 -36
- data/spec/models/actions_list400_response_spec.rb +0 -48
- data/spec/models/actions_update_request_spec.rb +0 -98
- data/spec/models/moderation_audio_request_spec.rb +0 -66
- data/spec/models/moderation_image200_response_labels_inner_spec.rb +0 -46
- data/spec/models/moderation_image200_response_spec.rb +0 -66
- data/spec/models/moderation_image_request_spec.rb +0 -66
- data/spec/models/moderation_object200_response_all_of_entities_inner_spec.rb +0 -48
- data/spec/models/moderation_object200_response_all_of_fields_inner_spec.rb +0 -48
- data/spec/models/moderation_object200_response_all_of_labels_inner_spec.rb +0 -48
- data/spec/models/moderation_object200_response_spec.rb +0 -90
- data/spec/models/moderation_object_request_spec.rb +0 -66
- data/spec/models/moderation_object_request_value_data_value_spec.rb +0 -52
- data/spec/models/moderation_object_request_value_spec.rb +0 -46
- data/spec/models/moderation_text200_response_all_of_address_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_email_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_name_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_nsfw_label_scores_spec.rb +0 -48
- data/spec/models/moderation_text200_response_all_of_nsfw_spec.rb +0 -60
- data/spec/models/moderation_text200_response_all_of_phone_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_profanity_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_propriety_label_scores_spec.rb +0 -48
- data/spec/models/moderation_text200_response_all_of_propriety_spec.rb +0 -60
- data/spec/models/moderation_text200_response_all_of_quality_label_scores_spec.rb +0 -54
- data/spec/models/moderation_text200_response_all_of_quality_spec.rb +0 -60
- data/spec/models/moderation_text200_response_all_of_request_spec.rb +0 -42
- data/spec/models/moderation_text200_response_all_of_sensitive_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_sentiment_label_scores_spec.rb +0 -48
- data/spec/models/moderation_text200_response_all_of_sentiment_spec.rb +0 -60
- data/spec/models/moderation_text200_response_all_of_toxicity_label_scores_spec.rb +0 -72
- data/spec/models/moderation_text200_response_all_of_toxicity_spec.rb +0 -60
- data/spec/models/moderation_text200_response_all_of_url_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_username_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_wordlist_spec.rb +0 -70
- data/spec/models/moderation_text200_response_all_of_wordlists_inner_spec.rb +0 -94
- data/spec/models/moderation_text200_response_spec.rb +0 -174
- data/spec/models/moderation_text_request_spec.rb +0 -66
- data/spec/models/moderation_video200_response_spec.rb +0 -54
- data/spec/models/moderation_video_request_spec.rb +0 -66
- data/spec/spec_helper.rb +0 -111
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see ModerationAPI::Resources::Authors#list
|
|
6
|
+
class AuthorListResponse < ModerationAPI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute authors
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<ModerationAPI::Models::AuthorListResponse::Author>]
|
|
10
|
+
required :authors,
|
|
11
|
+
-> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Models::AuthorListResponse::Author] }
|
|
12
|
+
|
|
13
|
+
# @!attribute pagination
|
|
14
|
+
#
|
|
15
|
+
# @return [ModerationAPI::Models::AuthorListResponse::Pagination]
|
|
16
|
+
required :pagination, -> { ModerationAPI::Models::AuthorListResponse::Pagination }
|
|
17
|
+
|
|
18
|
+
# @!method initialize(authors:, pagination:)
|
|
19
|
+
# @param authors [Array<ModerationAPI::Models::AuthorListResponse::Author>]
|
|
20
|
+
# @param pagination [ModerationAPI::Models::AuthorListResponse::Pagination]
|
|
21
|
+
|
|
22
|
+
class Author < ModerationAPI::Internal::Type::BaseModel
|
|
23
|
+
# @!attribute id
|
|
24
|
+
# Author ID in Moderation API
|
|
25
|
+
#
|
|
26
|
+
# @return [String]
|
|
27
|
+
required :id, String
|
|
28
|
+
|
|
29
|
+
# @!attribute block
|
|
30
|
+
# Block or suspension details, if applicable. Null if the author is enabled.
|
|
31
|
+
#
|
|
32
|
+
# @return [ModerationAPI::Models::AuthorListResponse::Author::Block, nil]
|
|
33
|
+
required :block, -> { ModerationAPI::Models::AuthorListResponse::Author::Block }, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute first_seen
|
|
36
|
+
# Timestamp when author first appeared
|
|
37
|
+
#
|
|
38
|
+
# @return [Float]
|
|
39
|
+
required :first_seen, Float
|
|
40
|
+
|
|
41
|
+
# @!attribute last_seen
|
|
42
|
+
# Timestamp of last activity
|
|
43
|
+
#
|
|
44
|
+
# @return [Float]
|
|
45
|
+
required :last_seen, Float
|
|
46
|
+
|
|
47
|
+
# @!attribute metadata
|
|
48
|
+
# Additional metadata provided by your system. We recommend including any relevant
|
|
49
|
+
# information that may assist in the moderation process.
|
|
50
|
+
#
|
|
51
|
+
# @return [ModerationAPI::Models::AuthorListResponse::Author::Metadata]
|
|
52
|
+
required :metadata, -> { ModerationAPI::Models::AuthorListResponse::Author::Metadata }
|
|
53
|
+
|
|
54
|
+
# @!attribute metrics
|
|
55
|
+
#
|
|
56
|
+
# @return [ModerationAPI::Models::AuthorListResponse::Author::Metrics]
|
|
57
|
+
required :metrics, -> { ModerationAPI::Models::AuthorListResponse::Author::Metrics }
|
|
58
|
+
|
|
59
|
+
# @!attribute risk_evaluation
|
|
60
|
+
# Risk assessment details, if available.
|
|
61
|
+
#
|
|
62
|
+
# @return [ModerationAPI::Models::AuthorListResponse::Author::RiskEvaluation, nil]
|
|
63
|
+
required :risk_evaluation,
|
|
64
|
+
-> { ModerationAPI::Models::AuthorListResponse::Author::RiskEvaluation },
|
|
65
|
+
nil?: true
|
|
66
|
+
|
|
67
|
+
# @!attribute status
|
|
68
|
+
# Current author status
|
|
69
|
+
#
|
|
70
|
+
# @return [Symbol, ModerationAPI::Models::AuthorListResponse::Author::Status]
|
|
71
|
+
required :status, enum: -> { ModerationAPI::Models::AuthorListResponse::Author::Status }
|
|
72
|
+
|
|
73
|
+
# @!attribute trust_level
|
|
74
|
+
#
|
|
75
|
+
# @return [ModerationAPI::Models::AuthorListResponse::Author::TrustLevel]
|
|
76
|
+
required :trust_level, -> { ModerationAPI::Models::AuthorListResponse::Author::TrustLevel }
|
|
77
|
+
|
|
78
|
+
# @!attribute email
|
|
79
|
+
# Author email address
|
|
80
|
+
#
|
|
81
|
+
# @return [String, nil]
|
|
82
|
+
optional :email, String, nil?: true
|
|
83
|
+
|
|
84
|
+
# @!attribute external_id
|
|
85
|
+
# The author's ID from your system
|
|
86
|
+
#
|
|
87
|
+
# @return [String, nil]
|
|
88
|
+
optional :external_id, String, nil?: true
|
|
89
|
+
|
|
90
|
+
# @!attribute external_link
|
|
91
|
+
# URL of the author's external profile
|
|
92
|
+
#
|
|
93
|
+
# @return [String, nil]
|
|
94
|
+
optional :external_link, String, nil?: true
|
|
95
|
+
|
|
96
|
+
# @!attribute last_incident
|
|
97
|
+
# Timestamp of last incident
|
|
98
|
+
#
|
|
99
|
+
# @return [Float, nil]
|
|
100
|
+
optional :last_incident, Float, nil?: true
|
|
101
|
+
|
|
102
|
+
# @!attribute name
|
|
103
|
+
# Author name or identifier
|
|
104
|
+
#
|
|
105
|
+
# @return [String, nil]
|
|
106
|
+
optional :name, String, nil?: true
|
|
107
|
+
|
|
108
|
+
# @!attribute profile_picture
|
|
109
|
+
# URL of the author's profile picture
|
|
110
|
+
#
|
|
111
|
+
# @return [String, nil]
|
|
112
|
+
optional :profile_picture, String, nil?: true
|
|
113
|
+
|
|
114
|
+
# @!method initialize(id:, block:, first_seen:, last_seen:, metadata:, metrics:, risk_evaluation:, status:, trust_level:, email: nil, external_id: nil, external_link: nil, last_incident: nil, name: nil, profile_picture: nil)
|
|
115
|
+
# Some parameter documentations has been truncated, see
|
|
116
|
+
# {ModerationAPI::Models::AuthorListResponse::Author} for more details.
|
|
117
|
+
#
|
|
118
|
+
# @param id [String] Author ID in Moderation API
|
|
119
|
+
#
|
|
120
|
+
# @param block [ModerationAPI::Models::AuthorListResponse::Author::Block, nil] Block or suspension details, if applicable. Null if the author is enabled.
|
|
121
|
+
#
|
|
122
|
+
# @param first_seen [Float] Timestamp when author first appeared
|
|
123
|
+
#
|
|
124
|
+
# @param last_seen [Float] Timestamp of last activity
|
|
125
|
+
#
|
|
126
|
+
# @param metadata [ModerationAPI::Models::AuthorListResponse::Author::Metadata] Additional metadata provided by your system. We recommend including any relevant
|
|
127
|
+
#
|
|
128
|
+
# @param metrics [ModerationAPI::Models::AuthorListResponse::Author::Metrics]
|
|
129
|
+
#
|
|
130
|
+
# @param risk_evaluation [ModerationAPI::Models::AuthorListResponse::Author::RiskEvaluation, nil] Risk assessment details, if available.
|
|
131
|
+
#
|
|
132
|
+
# @param status [Symbol, ModerationAPI::Models::AuthorListResponse::Author::Status] Current author status
|
|
133
|
+
#
|
|
134
|
+
# @param trust_level [ModerationAPI::Models::AuthorListResponse::Author::TrustLevel]
|
|
135
|
+
#
|
|
136
|
+
# @param email [String, nil] Author email address
|
|
137
|
+
#
|
|
138
|
+
# @param external_id [String, nil] The author's ID from your system
|
|
139
|
+
#
|
|
140
|
+
# @param external_link [String, nil] URL of the author's external profile
|
|
141
|
+
#
|
|
142
|
+
# @param last_incident [Float, nil] Timestamp of last incident
|
|
143
|
+
#
|
|
144
|
+
# @param name [String, nil] Author name or identifier
|
|
145
|
+
#
|
|
146
|
+
# @param profile_picture [String, nil] URL of the author's profile picture
|
|
147
|
+
|
|
148
|
+
# @see ModerationAPI::Models::AuthorListResponse::Author#block
|
|
149
|
+
class Block < ModerationAPI::Internal::Type::BaseModel
|
|
150
|
+
# @!attribute reason
|
|
151
|
+
# The moderators reason why the author was blocked or suspended.
|
|
152
|
+
#
|
|
153
|
+
# @return [String, nil]
|
|
154
|
+
optional :reason, String, nil?: true
|
|
155
|
+
|
|
156
|
+
# @!attribute until_
|
|
157
|
+
# The timestamp until which they are blocked if the author is suspended.
|
|
158
|
+
#
|
|
159
|
+
# @return [Float, nil]
|
|
160
|
+
optional :until_, Float, api_name: :until, nil?: true
|
|
161
|
+
|
|
162
|
+
# @!method initialize(reason: nil, until_: nil)
|
|
163
|
+
# Block or suspension details, if applicable. Null if the author is enabled.
|
|
164
|
+
#
|
|
165
|
+
# @param reason [String, nil] The moderators reason why the author was blocked or suspended.
|
|
166
|
+
#
|
|
167
|
+
# @param until_ [Float, nil] The timestamp until which they are blocked if the author is suspended.
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# @see ModerationAPI::Models::AuthorListResponse::Author#metadata
|
|
171
|
+
class Metadata < ModerationAPI::Internal::Type::BaseModel
|
|
172
|
+
# @!attribute email_verified
|
|
173
|
+
# Whether the author's email is verified
|
|
174
|
+
#
|
|
175
|
+
# @return [Boolean, nil]
|
|
176
|
+
optional :email_verified, ModerationAPI::Internal::Type::Boolean, nil?: true
|
|
177
|
+
|
|
178
|
+
# @!attribute identity_verified
|
|
179
|
+
# Whether the author's identity is verified
|
|
180
|
+
#
|
|
181
|
+
# @return [Boolean, nil]
|
|
182
|
+
optional :identity_verified, ModerationAPI::Internal::Type::Boolean, nil?: true
|
|
183
|
+
|
|
184
|
+
# @!attribute is_paying_customer
|
|
185
|
+
# Whether the author is a paying customer
|
|
186
|
+
#
|
|
187
|
+
# @return [Boolean, nil]
|
|
188
|
+
optional :is_paying_customer, ModerationAPI::Internal::Type::Boolean, nil?: true
|
|
189
|
+
|
|
190
|
+
# @!attribute phone_verified
|
|
191
|
+
# Whether the author's phone number is verified
|
|
192
|
+
#
|
|
193
|
+
# @return [Boolean, nil]
|
|
194
|
+
optional :phone_verified, ModerationAPI::Internal::Type::Boolean, nil?: true
|
|
195
|
+
|
|
196
|
+
# @!method initialize(email_verified: nil, identity_verified: nil, is_paying_customer: nil, phone_verified: nil)
|
|
197
|
+
# Additional metadata provided by your system. We recommend including any relevant
|
|
198
|
+
# information that may assist in the moderation process.
|
|
199
|
+
#
|
|
200
|
+
# @param email_verified [Boolean, nil] Whether the author's email is verified
|
|
201
|
+
#
|
|
202
|
+
# @param identity_verified [Boolean, nil] Whether the author's identity is verified
|
|
203
|
+
#
|
|
204
|
+
# @param is_paying_customer [Boolean, nil] Whether the author is a paying customer
|
|
205
|
+
#
|
|
206
|
+
# @param phone_verified [Boolean, nil] Whether the author's phone number is verified
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# @see ModerationAPI::Models::AuthorListResponse::Author#metrics
|
|
210
|
+
class Metrics < ModerationAPI::Internal::Type::BaseModel
|
|
211
|
+
# @!attribute flagged_content
|
|
212
|
+
# Number of flagged content pieces
|
|
213
|
+
#
|
|
214
|
+
# @return [Float]
|
|
215
|
+
required :flagged_content, Float
|
|
216
|
+
|
|
217
|
+
# @!attribute total_content
|
|
218
|
+
# Total pieces of content
|
|
219
|
+
#
|
|
220
|
+
# @return [Float]
|
|
221
|
+
required :total_content, Float
|
|
222
|
+
|
|
223
|
+
# @!attribute average_sentiment
|
|
224
|
+
# Average sentiment score of content (-1 to 1). Requires a sentiment model in your
|
|
225
|
+
# project.
|
|
226
|
+
#
|
|
227
|
+
# @return [Float, nil]
|
|
228
|
+
optional :average_sentiment, Float, nil?: true
|
|
229
|
+
|
|
230
|
+
# @!method initialize(flagged_content:, total_content:, average_sentiment: nil)
|
|
231
|
+
# Some parameter documentations has been truncated, see
|
|
232
|
+
# {ModerationAPI::Models::AuthorListResponse::Author::Metrics} for more details.
|
|
233
|
+
#
|
|
234
|
+
# @param flagged_content [Float] Number of flagged content pieces
|
|
235
|
+
#
|
|
236
|
+
# @param total_content [Float] Total pieces of content
|
|
237
|
+
#
|
|
238
|
+
# @param average_sentiment [Float, nil] Average sentiment score of content (-1 to 1). Requires a sentiment model in your
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# @see ModerationAPI::Models::AuthorListResponse::Author#risk_evaluation
|
|
242
|
+
class RiskEvaluation < ModerationAPI::Internal::Type::BaseModel
|
|
243
|
+
# @!attribute risk_level
|
|
244
|
+
# Calculated risk level based on more than 10 behavioral signals.
|
|
245
|
+
#
|
|
246
|
+
# @return [Float, nil]
|
|
247
|
+
optional :risk_level, Float, nil?: true
|
|
248
|
+
|
|
249
|
+
# @!method initialize(risk_level: nil)
|
|
250
|
+
# Risk assessment details, if available.
|
|
251
|
+
#
|
|
252
|
+
# @param risk_level [Float, nil] Calculated risk level based on more than 10 behavioral signals.
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Current author status
|
|
256
|
+
#
|
|
257
|
+
# @see ModerationAPI::Models::AuthorListResponse::Author#status
|
|
258
|
+
module Status
|
|
259
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
260
|
+
|
|
261
|
+
ENABLED = :enabled
|
|
262
|
+
SUSPENDED = :suspended
|
|
263
|
+
BLOCKED = :blocked
|
|
264
|
+
|
|
265
|
+
# @!method self.values
|
|
266
|
+
# @return [Array<Symbol>]
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# @see ModerationAPI::Models::AuthorListResponse::Author#trust_level
|
|
270
|
+
class TrustLevel < ModerationAPI::Internal::Type::BaseModel
|
|
271
|
+
# @!attribute level
|
|
272
|
+
# Author trust level (-1, 0, 1, 2, 3, or 4)
|
|
273
|
+
#
|
|
274
|
+
# @return [Float]
|
|
275
|
+
required :level, Float
|
|
276
|
+
|
|
277
|
+
# @!attribute manual
|
|
278
|
+
# True if the trust level was set manually by a moderator
|
|
279
|
+
#
|
|
280
|
+
# @return [Boolean]
|
|
281
|
+
required :manual, ModerationAPI::Internal::Type::Boolean
|
|
282
|
+
|
|
283
|
+
# @!method initialize(level:, manual:)
|
|
284
|
+
# @param level [Float] Author trust level (-1, 0, 1, 2, 3, or 4)
|
|
285
|
+
#
|
|
286
|
+
# @param manual [Boolean] True if the trust level was set manually by a moderator
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# @see ModerationAPI::Models::AuthorListResponse#pagination
|
|
291
|
+
class Pagination < ModerationAPI::Internal::Type::BaseModel
|
|
292
|
+
# @!attribute has_next_page
|
|
293
|
+
#
|
|
294
|
+
# @return [Boolean]
|
|
295
|
+
required :has_next_page, ModerationAPI::Internal::Type::Boolean, api_name: :hasNextPage
|
|
296
|
+
|
|
297
|
+
# @!attribute has_previous_page
|
|
298
|
+
#
|
|
299
|
+
# @return [Boolean]
|
|
300
|
+
required :has_previous_page, ModerationAPI::Internal::Type::Boolean, api_name: :hasPreviousPage
|
|
301
|
+
|
|
302
|
+
# @!attribute page_number
|
|
303
|
+
#
|
|
304
|
+
# @return [Float]
|
|
305
|
+
required :page_number, Float, api_name: :pageNumber
|
|
306
|
+
|
|
307
|
+
# @!attribute page_size
|
|
308
|
+
#
|
|
309
|
+
# @return [Float]
|
|
310
|
+
required :page_size, Float, api_name: :pageSize
|
|
311
|
+
|
|
312
|
+
# @!attribute total
|
|
313
|
+
#
|
|
314
|
+
# @return [Float]
|
|
315
|
+
required :total, Float
|
|
316
|
+
|
|
317
|
+
# @!method initialize(has_next_page:, has_previous_page:, page_number:, page_size:, total:)
|
|
318
|
+
# @param has_next_page [Boolean]
|
|
319
|
+
# @param has_previous_page [Boolean]
|
|
320
|
+
# @param page_number [Float]
|
|
321
|
+
# @param page_size [Float]
|
|
322
|
+
# @param total [Float]
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see ModerationAPI::Resources::Authors#retrieve
|
|
6
|
+
class AuthorRetrieveParams < ModerationAPI::Internal::Type::BaseModel
|
|
7
|
+
extend ModerationAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ModerationAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [ModerationAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see ModerationAPI::Resources::Authors#retrieve
|
|
6
|
+
class AuthorRetrieveResponse < ModerationAPI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Author ID in Moderation API
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute block
|
|
14
|
+
# Block or suspension details, if applicable. Null if the author is enabled.
|
|
15
|
+
#
|
|
16
|
+
# @return [ModerationAPI::Models::AuthorRetrieveResponse::Block, nil]
|
|
17
|
+
required :block, -> { ModerationAPI::Models::AuthorRetrieveResponse::Block }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute first_seen
|
|
20
|
+
# Timestamp when author first appeared
|
|
21
|
+
#
|
|
22
|
+
# @return [Float]
|
|
23
|
+
required :first_seen, Float
|
|
24
|
+
|
|
25
|
+
# @!attribute last_seen
|
|
26
|
+
# Timestamp of last activity
|
|
27
|
+
#
|
|
28
|
+
# @return [Float]
|
|
29
|
+
required :last_seen, Float
|
|
30
|
+
|
|
31
|
+
# @!attribute metadata
|
|
32
|
+
# Additional metadata provided by your system. We recommend including any relevant
|
|
33
|
+
# information that may assist in the moderation process.
|
|
34
|
+
#
|
|
35
|
+
# @return [ModerationAPI::Models::AuthorRetrieveResponse::Metadata]
|
|
36
|
+
required :metadata, -> { ModerationAPI::Models::AuthorRetrieveResponse::Metadata }
|
|
37
|
+
|
|
38
|
+
# @!attribute metrics
|
|
39
|
+
#
|
|
40
|
+
# @return [ModerationAPI::Models::AuthorRetrieveResponse::Metrics]
|
|
41
|
+
required :metrics, -> { ModerationAPI::Models::AuthorRetrieveResponse::Metrics }
|
|
42
|
+
|
|
43
|
+
# @!attribute risk_evaluation
|
|
44
|
+
# Risk assessment details, if available.
|
|
45
|
+
#
|
|
46
|
+
# @return [ModerationAPI::Models::AuthorRetrieveResponse::RiskEvaluation, nil]
|
|
47
|
+
required :risk_evaluation,
|
|
48
|
+
-> { ModerationAPI::Models::AuthorRetrieveResponse::RiskEvaluation },
|
|
49
|
+
nil?: true
|
|
50
|
+
|
|
51
|
+
# @!attribute status
|
|
52
|
+
# Current author status
|
|
53
|
+
#
|
|
54
|
+
# @return [Symbol, ModerationAPI::Models::AuthorRetrieveResponse::Status]
|
|
55
|
+
required :status, enum: -> { ModerationAPI::Models::AuthorRetrieveResponse::Status }
|
|
56
|
+
|
|
57
|
+
# @!attribute trust_level
|
|
58
|
+
#
|
|
59
|
+
# @return [ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel]
|
|
60
|
+
required :trust_level, -> { ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel }
|
|
61
|
+
|
|
62
|
+
# @!attribute email
|
|
63
|
+
# Author email address
|
|
64
|
+
#
|
|
65
|
+
# @return [String, nil]
|
|
66
|
+
optional :email, String, nil?: true
|
|
67
|
+
|
|
68
|
+
# @!attribute external_id
|
|
69
|
+
# The author's ID from your system
|
|
70
|
+
#
|
|
71
|
+
# @return [String, nil]
|
|
72
|
+
optional :external_id, String, nil?: true
|
|
73
|
+
|
|
74
|
+
# @!attribute external_link
|
|
75
|
+
# URL of the author's external profile
|
|
76
|
+
#
|
|
77
|
+
# @return [String, nil]
|
|
78
|
+
optional :external_link, String, nil?: true
|
|
79
|
+
|
|
80
|
+
# @!attribute last_incident
|
|
81
|
+
# Timestamp of last incident
|
|
82
|
+
#
|
|
83
|
+
# @return [Float, nil]
|
|
84
|
+
optional :last_incident, Float, nil?: true
|
|
85
|
+
|
|
86
|
+
# @!attribute name
|
|
87
|
+
# Author name or identifier
|
|
88
|
+
#
|
|
89
|
+
# @return [String, nil]
|
|
90
|
+
optional :name, String, nil?: true
|
|
91
|
+
|
|
92
|
+
# @!attribute profile_picture
|
|
93
|
+
# URL of the author's profile picture
|
|
94
|
+
#
|
|
95
|
+
# @return [String, nil]
|
|
96
|
+
optional :profile_picture, String, nil?: true
|
|
97
|
+
|
|
98
|
+
# @!method initialize(id:, block:, first_seen:, last_seen:, metadata:, metrics:, risk_evaluation:, status:, trust_level:, email: nil, external_id: nil, external_link: nil, last_incident: nil, name: nil, profile_picture: nil)
|
|
99
|
+
# Some parameter documentations has been truncated, see
|
|
100
|
+
# {ModerationAPI::Models::AuthorRetrieveResponse} for more details.
|
|
101
|
+
#
|
|
102
|
+
# @param id [String] Author ID in Moderation API
|
|
103
|
+
#
|
|
104
|
+
# @param block [ModerationAPI::Models::AuthorRetrieveResponse::Block, nil] Block or suspension details, if applicable. Null if the author is enabled.
|
|
105
|
+
#
|
|
106
|
+
# @param first_seen [Float] Timestamp when author first appeared
|
|
107
|
+
#
|
|
108
|
+
# @param last_seen [Float] Timestamp of last activity
|
|
109
|
+
#
|
|
110
|
+
# @param metadata [ModerationAPI::Models::AuthorRetrieveResponse::Metadata] Additional metadata provided by your system. We recommend including any relevant
|
|
111
|
+
#
|
|
112
|
+
# @param metrics [ModerationAPI::Models::AuthorRetrieveResponse::Metrics]
|
|
113
|
+
#
|
|
114
|
+
# @param risk_evaluation [ModerationAPI::Models::AuthorRetrieveResponse::RiskEvaluation, nil] Risk assessment details, if available.
|
|
115
|
+
#
|
|
116
|
+
# @param status [Symbol, ModerationAPI::Models::AuthorRetrieveResponse::Status] Current author status
|
|
117
|
+
#
|
|
118
|
+
# @param trust_level [ModerationAPI::Models::AuthorRetrieveResponse::TrustLevel]
|
|
119
|
+
#
|
|
120
|
+
# @param email [String, nil] Author email address
|
|
121
|
+
#
|
|
122
|
+
# @param external_id [String, nil] The author's ID from your system
|
|
123
|
+
#
|
|
124
|
+
# @param external_link [String, nil] URL of the author's external profile
|
|
125
|
+
#
|
|
126
|
+
# @param last_incident [Float, nil] Timestamp of last incident
|
|
127
|
+
#
|
|
128
|
+
# @param name [String, nil] Author name or identifier
|
|
129
|
+
#
|
|
130
|
+
# @param profile_picture [String, nil] URL of the author's profile picture
|
|
131
|
+
|
|
132
|
+
# @see ModerationAPI::Models::AuthorRetrieveResponse#block
|
|
133
|
+
class Block < ModerationAPI::Internal::Type::BaseModel
|
|
134
|
+
# @!attribute reason
|
|
135
|
+
# The moderators reason why the author was blocked or suspended.
|
|
136
|
+
#
|
|
137
|
+
# @return [String, nil]
|
|
138
|
+
optional :reason, String, nil?: true
|
|
139
|
+
|
|
140
|
+
# @!attribute until_
|
|
141
|
+
# The timestamp until which they are blocked if the author is suspended.
|
|
142
|
+
#
|
|
143
|
+
# @return [Float, nil]
|
|
144
|
+
optional :until_, Float, api_name: :until, nil?: true
|
|
145
|
+
|
|
146
|
+
# @!method initialize(reason: nil, until_: nil)
|
|
147
|
+
# Block or suspension details, if applicable. Null if the author is enabled.
|
|
148
|
+
#
|
|
149
|
+
# @param reason [String, nil] The moderators reason why the author was blocked or suspended.
|
|
150
|
+
#
|
|
151
|
+
# @param until_ [Float, nil] The timestamp until which they are blocked if the author is suspended.
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# @see ModerationAPI::Models::AuthorRetrieveResponse#metadata
|
|
155
|
+
class Metadata < ModerationAPI::Internal::Type::BaseModel
|
|
156
|
+
# @!attribute email_verified
|
|
157
|
+
# Whether the author's email is verified
|
|
158
|
+
#
|
|
159
|
+
# @return [Boolean, nil]
|
|
160
|
+
optional :email_verified, ModerationAPI::Internal::Type::Boolean, nil?: true
|
|
161
|
+
|
|
162
|
+
# @!attribute identity_verified
|
|
163
|
+
# Whether the author's identity is verified
|
|
164
|
+
#
|
|
165
|
+
# @return [Boolean, nil]
|
|
166
|
+
optional :identity_verified, ModerationAPI::Internal::Type::Boolean, nil?: true
|
|
167
|
+
|
|
168
|
+
# @!attribute is_paying_customer
|
|
169
|
+
# Whether the author is a paying customer
|
|
170
|
+
#
|
|
171
|
+
# @return [Boolean, nil]
|
|
172
|
+
optional :is_paying_customer, ModerationAPI::Internal::Type::Boolean, nil?: true
|
|
173
|
+
|
|
174
|
+
# @!attribute phone_verified
|
|
175
|
+
# Whether the author's phone number is verified
|
|
176
|
+
#
|
|
177
|
+
# @return [Boolean, nil]
|
|
178
|
+
optional :phone_verified, ModerationAPI::Internal::Type::Boolean, nil?: true
|
|
179
|
+
|
|
180
|
+
# @!method initialize(email_verified: nil, identity_verified: nil, is_paying_customer: nil, phone_verified: nil)
|
|
181
|
+
# Additional metadata provided by your system. We recommend including any relevant
|
|
182
|
+
# information that may assist in the moderation process.
|
|
183
|
+
#
|
|
184
|
+
# @param email_verified [Boolean, nil] Whether the author's email is verified
|
|
185
|
+
#
|
|
186
|
+
# @param identity_verified [Boolean, nil] Whether the author's identity is verified
|
|
187
|
+
#
|
|
188
|
+
# @param is_paying_customer [Boolean, nil] Whether the author is a paying customer
|
|
189
|
+
#
|
|
190
|
+
# @param phone_verified [Boolean, nil] Whether the author's phone number is verified
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# @see ModerationAPI::Models::AuthorRetrieveResponse#metrics
|
|
194
|
+
class Metrics < ModerationAPI::Internal::Type::BaseModel
|
|
195
|
+
# @!attribute flagged_content
|
|
196
|
+
# Number of flagged content pieces
|
|
197
|
+
#
|
|
198
|
+
# @return [Float]
|
|
199
|
+
required :flagged_content, Float
|
|
200
|
+
|
|
201
|
+
# @!attribute total_content
|
|
202
|
+
# Total pieces of content
|
|
203
|
+
#
|
|
204
|
+
# @return [Float]
|
|
205
|
+
required :total_content, Float
|
|
206
|
+
|
|
207
|
+
# @!attribute average_sentiment
|
|
208
|
+
# Average sentiment score of content (-1 to 1). Requires a sentiment model in your
|
|
209
|
+
# project.
|
|
210
|
+
#
|
|
211
|
+
# @return [Float, nil]
|
|
212
|
+
optional :average_sentiment, Float, nil?: true
|
|
213
|
+
|
|
214
|
+
# @!method initialize(flagged_content:, total_content:, average_sentiment: nil)
|
|
215
|
+
# Some parameter documentations has been truncated, see
|
|
216
|
+
# {ModerationAPI::Models::AuthorRetrieveResponse::Metrics} for more details.
|
|
217
|
+
#
|
|
218
|
+
# @param flagged_content [Float] Number of flagged content pieces
|
|
219
|
+
#
|
|
220
|
+
# @param total_content [Float] Total pieces of content
|
|
221
|
+
#
|
|
222
|
+
# @param average_sentiment [Float, nil] Average sentiment score of content (-1 to 1). Requires a sentiment model in your
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# @see ModerationAPI::Models::AuthorRetrieveResponse#risk_evaluation
|
|
226
|
+
class RiskEvaluation < ModerationAPI::Internal::Type::BaseModel
|
|
227
|
+
# @!attribute risk_level
|
|
228
|
+
# Calculated risk level based on more than 10 behavioral signals.
|
|
229
|
+
#
|
|
230
|
+
# @return [Float, nil]
|
|
231
|
+
optional :risk_level, Float, nil?: true
|
|
232
|
+
|
|
233
|
+
# @!method initialize(risk_level: nil)
|
|
234
|
+
# Risk assessment details, if available.
|
|
235
|
+
#
|
|
236
|
+
# @param risk_level [Float, nil] Calculated risk level based on more than 10 behavioral signals.
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Current author status
|
|
240
|
+
#
|
|
241
|
+
# @see ModerationAPI::Models::AuthorRetrieveResponse#status
|
|
242
|
+
module Status
|
|
243
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
244
|
+
|
|
245
|
+
ENABLED = :enabled
|
|
246
|
+
SUSPENDED = :suspended
|
|
247
|
+
BLOCKED = :blocked
|
|
248
|
+
|
|
249
|
+
# @!method self.values
|
|
250
|
+
# @return [Array<Symbol>]
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# @see ModerationAPI::Models::AuthorRetrieveResponse#trust_level
|
|
254
|
+
class TrustLevel < ModerationAPI::Internal::Type::BaseModel
|
|
255
|
+
# @!attribute level
|
|
256
|
+
# Author trust level (-1, 0, 1, 2, 3, or 4)
|
|
257
|
+
#
|
|
258
|
+
# @return [Float]
|
|
259
|
+
required :level, Float
|
|
260
|
+
|
|
261
|
+
# @!attribute manual
|
|
262
|
+
# True if the trust level was set manually by a moderator
|
|
263
|
+
#
|
|
264
|
+
# @return [Boolean]
|
|
265
|
+
required :manual, ModerationAPI::Internal::Type::Boolean
|
|
266
|
+
|
|
267
|
+
# @!method initialize(level:, manual:)
|
|
268
|
+
# @param level [Float] Author trust level (-1, 0, 1, 2, 3, or 4)
|
|
269
|
+
#
|
|
270
|
+
# @param manual [Boolean] True if the trust level was set manually by a moderator
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
end
|