moderation_api 1.2.2 → 2.0.0
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 +28 -0
- data/README.md +200 -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,217 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see ModerationAPI::Resources::Actions#update
|
|
6
|
+
class ActionUpdateParams < ModerationAPI::Internal::Type::BaseModel
|
|
7
|
+
extend ModerationAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ModerationAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute built_in
|
|
11
|
+
# Whether the action is a built-in action or a custom one.
|
|
12
|
+
#
|
|
13
|
+
# @return [Boolean, nil]
|
|
14
|
+
optional :built_in, ModerationAPI::Internal::Type::Boolean, api_name: :builtIn, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute description
|
|
17
|
+
# The description of the action.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :description, String, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute filter_in_queue_ids
|
|
23
|
+
# The IDs of the queues the action is available in.
|
|
24
|
+
#
|
|
25
|
+
# @return [Array<String>, nil]
|
|
26
|
+
optional :filter_in_queue_ids,
|
|
27
|
+
ModerationAPI::Internal::Type::ArrayOf[String],
|
|
28
|
+
api_name: :filterInQueueIds
|
|
29
|
+
|
|
30
|
+
# @!attribute free_text
|
|
31
|
+
# Whether the action allows any text to be entered as a value or if it must be one
|
|
32
|
+
# of the possible values.
|
|
33
|
+
#
|
|
34
|
+
# @return [Boolean, nil]
|
|
35
|
+
optional :free_text, ModerationAPI::Internal::Type::Boolean, api_name: :freeText
|
|
36
|
+
|
|
37
|
+
# @!attribute key
|
|
38
|
+
# User defined key of the action.
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :key, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute name
|
|
44
|
+
# The name of the action.
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
optional :name, String
|
|
48
|
+
|
|
49
|
+
# @!attribute position
|
|
50
|
+
# Show the action in all queues, selected queues or no queues (to use via API
|
|
51
|
+
# only).
|
|
52
|
+
#
|
|
53
|
+
# @return [Symbol, ModerationAPI::Models::ActionUpdateParams::Position, nil]
|
|
54
|
+
optional :position, enum: -> { ModerationAPI::ActionUpdateParams::Position }
|
|
55
|
+
|
|
56
|
+
# @!attribute possible_values
|
|
57
|
+
# The possible values of the action. The user will be prompted to select one of
|
|
58
|
+
# these values when executing the action.
|
|
59
|
+
#
|
|
60
|
+
# @return [Array<ModerationAPI::Models::ActionUpdateParams::PossibleValue>, nil]
|
|
61
|
+
optional :possible_values,
|
|
62
|
+
-> {
|
|
63
|
+
ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::ActionUpdateParams::PossibleValue]
|
|
64
|
+
},
|
|
65
|
+
api_name: :possibleValues
|
|
66
|
+
|
|
67
|
+
# @!attribute queue_behaviour
|
|
68
|
+
# Whether the action resolves and removes the item, unresolves and re-add it to
|
|
69
|
+
# the queue, or does not change the resolve status.
|
|
70
|
+
#
|
|
71
|
+
# @return [Symbol, ModerationAPI::Models::ActionUpdateParams::QueueBehaviour, nil]
|
|
72
|
+
optional :queue_behaviour,
|
|
73
|
+
enum: -> { ModerationAPI::ActionUpdateParams::QueueBehaviour },
|
|
74
|
+
api_name: :queueBehaviour
|
|
75
|
+
|
|
76
|
+
# @!attribute type
|
|
77
|
+
# The type of the action.
|
|
78
|
+
#
|
|
79
|
+
# @return [Symbol, ModerationAPI::Models::ActionUpdateParams::Type, nil]
|
|
80
|
+
optional :type, enum: -> { ModerationAPI::ActionUpdateParams::Type }, nil?: true
|
|
81
|
+
|
|
82
|
+
# @!attribute value_required
|
|
83
|
+
# Whether the action requires a value to be executed.
|
|
84
|
+
#
|
|
85
|
+
# @return [Boolean, nil]
|
|
86
|
+
optional :value_required, ModerationAPI::Internal::Type::Boolean, api_name: :valueRequired
|
|
87
|
+
|
|
88
|
+
# @!attribute webhooks
|
|
89
|
+
# The action's webhooks.
|
|
90
|
+
#
|
|
91
|
+
# @return [Array<ModerationAPI::Models::ActionUpdateParams::Webhook>, nil]
|
|
92
|
+
optional :webhooks,
|
|
93
|
+
-> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::ActionUpdateParams::Webhook] }
|
|
94
|
+
|
|
95
|
+
# @!method initialize(built_in: nil, description: nil, filter_in_queue_ids: nil, free_text: nil, key: nil, name: nil, position: nil, possible_values: nil, queue_behaviour: nil, type: nil, value_required: nil, webhooks: nil, request_options: {})
|
|
96
|
+
# Some parameter documentations has been truncated, see
|
|
97
|
+
# {ModerationAPI::Models::ActionUpdateParams} for more details.
|
|
98
|
+
#
|
|
99
|
+
# @param built_in [Boolean, nil] Whether the action is a built-in action or a custom one.
|
|
100
|
+
#
|
|
101
|
+
# @param description [String, nil] The description of the action.
|
|
102
|
+
#
|
|
103
|
+
# @param filter_in_queue_ids [Array<String>] The IDs of the queues the action is available in.
|
|
104
|
+
#
|
|
105
|
+
# @param free_text [Boolean] Whether the action allows any text to be entered as a value or if it must be one
|
|
106
|
+
#
|
|
107
|
+
# @param key [String, nil] User defined key of the action.
|
|
108
|
+
#
|
|
109
|
+
# @param name [String] The name of the action.
|
|
110
|
+
#
|
|
111
|
+
# @param position [Symbol, ModerationAPI::Models::ActionUpdateParams::Position] Show the action in all queues, selected queues or no queues (to use via API only
|
|
112
|
+
#
|
|
113
|
+
# @param possible_values [Array<ModerationAPI::Models::ActionUpdateParams::PossibleValue>] The possible values of the action. The user will be prompted to select one of th
|
|
114
|
+
#
|
|
115
|
+
# @param queue_behaviour [Symbol, ModerationAPI::Models::ActionUpdateParams::QueueBehaviour] Whether the action resolves and removes the item, unresolves and re-add it to th
|
|
116
|
+
#
|
|
117
|
+
# @param type [Symbol, ModerationAPI::Models::ActionUpdateParams::Type, nil] The type of the action.
|
|
118
|
+
#
|
|
119
|
+
# @param value_required [Boolean] Whether the action requires a value to be executed.
|
|
120
|
+
#
|
|
121
|
+
# @param webhooks [Array<ModerationAPI::Models::ActionUpdateParams::Webhook>] The action's webhooks.
|
|
122
|
+
#
|
|
123
|
+
# @param request_options [ModerationAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
124
|
+
|
|
125
|
+
# Show the action in all queues, selected queues or no queues (to use via API
|
|
126
|
+
# only).
|
|
127
|
+
module Position
|
|
128
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
129
|
+
|
|
130
|
+
ALL_QUEUES = :ALL_QUEUES
|
|
131
|
+
SOME_QUEUES = :SOME_QUEUES
|
|
132
|
+
HIDDEN = :HIDDEN
|
|
133
|
+
|
|
134
|
+
# @!method self.values
|
|
135
|
+
# @return [Array<Symbol>]
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
class PossibleValue < ModerationAPI::Internal::Type::BaseModel
|
|
139
|
+
# @!attribute value
|
|
140
|
+
# The value of the action.
|
|
141
|
+
#
|
|
142
|
+
# @return [String]
|
|
143
|
+
required :value, String
|
|
144
|
+
|
|
145
|
+
# @!method initialize(value:)
|
|
146
|
+
# @param value [String] The value of the action.
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Whether the action resolves and removes the item, unresolves and re-add it to
|
|
150
|
+
# the queue, or does not change the resolve status.
|
|
151
|
+
module QueueBehaviour
|
|
152
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
153
|
+
|
|
154
|
+
REMOVE = :REMOVE
|
|
155
|
+
ADD = :ADD
|
|
156
|
+
NO_CHANGE = :NO_CHANGE
|
|
157
|
+
|
|
158
|
+
# @!method self.values
|
|
159
|
+
# @return [Array<Symbol>]
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# The type of the action.
|
|
163
|
+
module Type
|
|
164
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
165
|
+
|
|
166
|
+
AUTHOR_BLOCK = :AUTHOR_BLOCK
|
|
167
|
+
AUTHOR_BLOCK_TEMP = :AUTHOR_BLOCK_TEMP
|
|
168
|
+
AUTHOR_UNBLOCK = :AUTHOR_UNBLOCK
|
|
169
|
+
AUTHOR_DELETE = :AUTHOR_DELETE
|
|
170
|
+
AUTHOR_REPORT = :AUTHOR_REPORT
|
|
171
|
+
AUTHOR_WARN = :AUTHOR_WARN
|
|
172
|
+
AUTHOR_CUSTOM = :AUTHOR_CUSTOM
|
|
173
|
+
ITEM_REJECT = :ITEM_REJECT
|
|
174
|
+
ITEM_ALLOW = :ITEM_ALLOW
|
|
175
|
+
ITEM_CUSTOM = :ITEM_CUSTOM
|
|
176
|
+
|
|
177
|
+
# @!method self.values
|
|
178
|
+
# @return [Array<Symbol>]
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
class Webhook < ModerationAPI::Internal::Type::BaseModel
|
|
182
|
+
# @!attribute name
|
|
183
|
+
# The webhook's name, used to identify it in the dashboard
|
|
184
|
+
#
|
|
185
|
+
# @return [String]
|
|
186
|
+
required :name, String
|
|
187
|
+
|
|
188
|
+
# @!attribute url
|
|
189
|
+
# The webhook's URL. We'll call this URL when the event occurs.
|
|
190
|
+
#
|
|
191
|
+
# @return [String]
|
|
192
|
+
required :url, String
|
|
193
|
+
|
|
194
|
+
# @!attribute id
|
|
195
|
+
# ID of an existing webhook or undefined if this is a new webhook.
|
|
196
|
+
#
|
|
197
|
+
# @return [String, nil]
|
|
198
|
+
optional :id, String
|
|
199
|
+
|
|
200
|
+
# @!attribute description
|
|
201
|
+
# The webhook's description
|
|
202
|
+
#
|
|
203
|
+
# @return [String, nil]
|
|
204
|
+
optional :description, String, nil?: true
|
|
205
|
+
|
|
206
|
+
# @!method initialize(name:, url:, id: nil, description: nil)
|
|
207
|
+
# @param name [String] The webhook's name, used to identify it in the dashboard
|
|
208
|
+
#
|
|
209
|
+
# @param url [String] The webhook's URL. We'll call this URL when the event occurs.
|
|
210
|
+
#
|
|
211
|
+
# @param id [String] ID of an existing webhook or undefined if this is a new webhook.
|
|
212
|
+
#
|
|
213
|
+
# @param description [String, nil] The webhook's description
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
end
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see ModerationAPI::Resources::Actions#update
|
|
6
|
+
class ActionUpdateResponse < ModerationAPI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the action.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute built_in
|
|
14
|
+
# Whether the action is a built-in action or a custom one.
|
|
15
|
+
#
|
|
16
|
+
# @return [Boolean, nil]
|
|
17
|
+
required :built_in, ModerationAPI::Internal::Type::Boolean, api_name: :builtIn, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute created_at
|
|
20
|
+
# The date the action was created.
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :created_at, String, api_name: :createdAt
|
|
24
|
+
|
|
25
|
+
# @!attribute filter_in_queue_ids
|
|
26
|
+
# The IDs of the queues the action is available in.
|
|
27
|
+
#
|
|
28
|
+
# @return [Array<String>]
|
|
29
|
+
required :filter_in_queue_ids,
|
|
30
|
+
ModerationAPI::Internal::Type::ArrayOf[String],
|
|
31
|
+
api_name: :filterInQueueIds
|
|
32
|
+
|
|
33
|
+
# @!attribute free_text
|
|
34
|
+
# Whether the action allows any text to be entered as a value or if it must be one
|
|
35
|
+
# of the possible values.
|
|
36
|
+
#
|
|
37
|
+
# @return [Boolean]
|
|
38
|
+
required :free_text, ModerationAPI::Internal::Type::Boolean, api_name: :freeText
|
|
39
|
+
|
|
40
|
+
# @!attribute name
|
|
41
|
+
# The name of the action.
|
|
42
|
+
#
|
|
43
|
+
# @return [String]
|
|
44
|
+
required :name, String
|
|
45
|
+
|
|
46
|
+
# @!attribute position
|
|
47
|
+
# Show the action in all queues, selected queues or no queues (to use via API
|
|
48
|
+
# only).
|
|
49
|
+
#
|
|
50
|
+
# @return [Symbol, ModerationAPI::Models::ActionUpdateResponse::Position]
|
|
51
|
+
required :position, enum: -> { ModerationAPI::Models::ActionUpdateResponse::Position }
|
|
52
|
+
|
|
53
|
+
# @!attribute possible_values
|
|
54
|
+
# The possible values of the action. The user will be prompted to select one of
|
|
55
|
+
# these values when executing the action.
|
|
56
|
+
#
|
|
57
|
+
# @return [Array<ModerationAPI::Models::ActionUpdateResponse::PossibleValue>]
|
|
58
|
+
required :possible_values,
|
|
59
|
+
-> { ModerationAPI::Internal::Type::ArrayOf[ModerationAPI::Models::ActionUpdateResponse::PossibleValue] },
|
|
60
|
+
api_name: :possibleValues
|
|
61
|
+
|
|
62
|
+
# @!attribute queue_behaviour
|
|
63
|
+
# Whether the action resolves and removes the item, unresolves and re-add it to
|
|
64
|
+
# the queue, or does not change the resolve status.
|
|
65
|
+
#
|
|
66
|
+
# @return [Symbol, ModerationAPI::Models::ActionUpdateResponse::QueueBehaviour]
|
|
67
|
+
required :queue_behaviour,
|
|
68
|
+
enum: -> { ModerationAPI::Models::ActionUpdateResponse::QueueBehaviour },
|
|
69
|
+
api_name: :queueBehaviour
|
|
70
|
+
|
|
71
|
+
# @!attribute value_required
|
|
72
|
+
# Whether the action requires a value to be executed.
|
|
73
|
+
#
|
|
74
|
+
# @return [Boolean]
|
|
75
|
+
required :value_required, ModerationAPI::Internal::Type::Boolean, api_name: :valueRequired
|
|
76
|
+
|
|
77
|
+
# @!attribute description
|
|
78
|
+
# The description of the action.
|
|
79
|
+
#
|
|
80
|
+
# @return [String, nil]
|
|
81
|
+
optional :description, String, nil?: true
|
|
82
|
+
|
|
83
|
+
# @!attribute key
|
|
84
|
+
# User defined key of the action.
|
|
85
|
+
#
|
|
86
|
+
# @return [String, nil]
|
|
87
|
+
optional :key, String, nil?: true
|
|
88
|
+
|
|
89
|
+
# @!attribute type
|
|
90
|
+
# The type of the action.
|
|
91
|
+
#
|
|
92
|
+
# @return [Symbol, ModerationAPI::Models::ActionUpdateResponse::Type, nil]
|
|
93
|
+
optional :type, enum: -> { ModerationAPI::Models::ActionUpdateResponse::Type }, nil?: true
|
|
94
|
+
|
|
95
|
+
# @!method initialize(id:, built_in:, created_at:, filter_in_queue_ids:, free_text:, name:, position:, possible_values:, queue_behaviour:, value_required:, description: nil, key: nil, type: nil)
|
|
96
|
+
# Some parameter documentations has been truncated, see
|
|
97
|
+
# {ModerationAPI::Models::ActionUpdateResponse} for more details.
|
|
98
|
+
#
|
|
99
|
+
# @param id [String] The ID of the action.
|
|
100
|
+
#
|
|
101
|
+
# @param built_in [Boolean, nil] Whether the action is a built-in action or a custom one.
|
|
102
|
+
#
|
|
103
|
+
# @param created_at [String] The date the action was created.
|
|
104
|
+
#
|
|
105
|
+
# @param filter_in_queue_ids [Array<String>] The IDs of the queues the action is available in.
|
|
106
|
+
#
|
|
107
|
+
# @param free_text [Boolean] Whether the action allows any text to be entered as a value or if it must be one
|
|
108
|
+
#
|
|
109
|
+
# @param name [String] The name of the action.
|
|
110
|
+
#
|
|
111
|
+
# @param position [Symbol, ModerationAPI::Models::ActionUpdateResponse::Position] Show the action in all queues, selected queues or no queues (to use via API only
|
|
112
|
+
#
|
|
113
|
+
# @param possible_values [Array<ModerationAPI::Models::ActionUpdateResponse::PossibleValue>] The possible values of the action. The user will be prompted to select one of th
|
|
114
|
+
#
|
|
115
|
+
# @param queue_behaviour [Symbol, ModerationAPI::Models::ActionUpdateResponse::QueueBehaviour] Whether the action resolves and removes the item, unresolves and re-add it to th
|
|
116
|
+
#
|
|
117
|
+
# @param value_required [Boolean] Whether the action requires a value to be executed.
|
|
118
|
+
#
|
|
119
|
+
# @param description [String, nil] The description of the action.
|
|
120
|
+
#
|
|
121
|
+
# @param key [String, nil] User defined key of the action.
|
|
122
|
+
#
|
|
123
|
+
# @param type [Symbol, ModerationAPI::Models::ActionUpdateResponse::Type, nil] The type of the action.
|
|
124
|
+
|
|
125
|
+
# Show the action in all queues, selected queues or no queues (to use via API
|
|
126
|
+
# only).
|
|
127
|
+
#
|
|
128
|
+
# @see ModerationAPI::Models::ActionUpdateResponse#position
|
|
129
|
+
module Position
|
|
130
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
131
|
+
|
|
132
|
+
ALL_QUEUES = :ALL_QUEUES
|
|
133
|
+
SOME_QUEUES = :SOME_QUEUES
|
|
134
|
+
HIDDEN = :HIDDEN
|
|
135
|
+
|
|
136
|
+
# @!method self.values
|
|
137
|
+
# @return [Array<Symbol>]
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
class PossibleValue < ModerationAPI::Internal::Type::BaseModel
|
|
141
|
+
# @!attribute value
|
|
142
|
+
# The value of the action.
|
|
143
|
+
#
|
|
144
|
+
# @return [String]
|
|
145
|
+
required :value, String
|
|
146
|
+
|
|
147
|
+
# @!method initialize(value:)
|
|
148
|
+
# @param value [String] The value of the action.
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Whether the action resolves and removes the item, unresolves and re-add it to
|
|
152
|
+
# the queue, or does not change the resolve status.
|
|
153
|
+
#
|
|
154
|
+
# @see ModerationAPI::Models::ActionUpdateResponse#queue_behaviour
|
|
155
|
+
module QueueBehaviour
|
|
156
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
157
|
+
|
|
158
|
+
REMOVE = :REMOVE
|
|
159
|
+
ADD = :ADD
|
|
160
|
+
NO_CHANGE = :NO_CHANGE
|
|
161
|
+
|
|
162
|
+
# @!method self.values
|
|
163
|
+
# @return [Array<Symbol>]
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# The type of the action.
|
|
167
|
+
#
|
|
168
|
+
# @see ModerationAPI::Models::ActionUpdateResponse#type
|
|
169
|
+
module Type
|
|
170
|
+
extend ModerationAPI::Internal::Type::Enum
|
|
171
|
+
|
|
172
|
+
AUTHOR_BLOCK = :AUTHOR_BLOCK
|
|
173
|
+
AUTHOR_BLOCK_TEMP = :AUTHOR_BLOCK_TEMP
|
|
174
|
+
AUTHOR_UNBLOCK = :AUTHOR_UNBLOCK
|
|
175
|
+
AUTHOR_DELETE = :AUTHOR_DELETE
|
|
176
|
+
AUTHOR_REPORT = :AUTHOR_REPORT
|
|
177
|
+
AUTHOR_WARN = :AUTHOR_WARN
|
|
178
|
+
AUTHOR_CUSTOM = :AUTHOR_CUSTOM
|
|
179
|
+
ITEM_REJECT = :ITEM_REJECT
|
|
180
|
+
ITEM_ALLOW = :ITEM_ALLOW
|
|
181
|
+
ITEM_CUSTOM = :ITEM_CUSTOM
|
|
182
|
+
|
|
183
|
+
# @!method self.values
|
|
184
|
+
# @return [Array<Symbol>]
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
module Actions
|
|
6
|
+
# @see ModerationAPI::Resources::Actions::Execute#execute_by_id
|
|
7
|
+
class ExecuteExecuteByIDParams < ModerationAPI::Internal::Type::BaseModel
|
|
8
|
+
extend ModerationAPI::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include ModerationAPI::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute author_ids
|
|
12
|
+
# IDs of the authors to apply the action to
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<String>, nil]
|
|
15
|
+
optional :author_ids, ModerationAPI::Internal::Type::ArrayOf[String], api_name: :authorIds
|
|
16
|
+
|
|
17
|
+
# @!attribute content_ids
|
|
18
|
+
# The IDs of the content items to perform the action on.
|
|
19
|
+
#
|
|
20
|
+
# @return [Array<String>, nil]
|
|
21
|
+
optional :content_ids, ModerationAPI::Internal::Type::ArrayOf[String], api_name: :contentIds
|
|
22
|
+
|
|
23
|
+
# @!attribute queue_id
|
|
24
|
+
# The ID of the queue the action was performed from if any.
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :queue_id, String, api_name: :queueId
|
|
28
|
+
|
|
29
|
+
# @!attribute value
|
|
30
|
+
# The value of the action. Useful to set a reason for the action etc.
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :value, String
|
|
34
|
+
|
|
35
|
+
# @!method initialize(author_ids: nil, content_ids: nil, queue_id: nil, value: nil, request_options: {})
|
|
36
|
+
# @param author_ids [Array<String>] IDs of the authors to apply the action to
|
|
37
|
+
#
|
|
38
|
+
# @param content_ids [Array<String>] The IDs of the content items to perform the action on.
|
|
39
|
+
#
|
|
40
|
+
# @param queue_id [String] The ID of the queue the action was performed from if any.
|
|
41
|
+
#
|
|
42
|
+
# @param value [String] The value of the action. Useful to set a reason for the action etc.
|
|
43
|
+
#
|
|
44
|
+
# @param request_options [ModerationAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
module Actions
|
|
6
|
+
# @see ModerationAPI::Resources::Actions::Execute#execute_by_id
|
|
7
|
+
class ExecuteExecuteByIDResponse < ModerationAPI::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute action_id
|
|
9
|
+
# The ID of the action.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :action_id, String, api_name: :actionId
|
|
13
|
+
|
|
14
|
+
# @!attribute ids
|
|
15
|
+
# The IDs of the content items.
|
|
16
|
+
#
|
|
17
|
+
# @return [Array<String>]
|
|
18
|
+
required :ids, ModerationAPI::Internal::Type::ArrayOf[String]
|
|
19
|
+
|
|
20
|
+
# @!attribute success
|
|
21
|
+
# Action executed successfully.
|
|
22
|
+
#
|
|
23
|
+
# @return [Boolean]
|
|
24
|
+
required :success, ModerationAPI::Internal::Type::Boolean
|
|
25
|
+
|
|
26
|
+
# @!method initialize(action_id:, ids:, success:)
|
|
27
|
+
# @param action_id [String] The ID of the action.
|
|
28
|
+
#
|
|
29
|
+
# @param ids [Array<String>] The IDs of the content items.
|
|
30
|
+
#
|
|
31
|
+
# @param success [Boolean] Action executed successfully.
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
module Actions
|
|
6
|
+
# @see ModerationAPI::Resources::Actions::Execute#execute
|
|
7
|
+
class ExecuteExecuteParams < ModerationAPI::Internal::Type::BaseModel
|
|
8
|
+
extend ModerationAPI::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include ModerationAPI::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute action_key
|
|
12
|
+
# ID or key of the action to execute
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :action_key, String, api_name: :actionKey
|
|
16
|
+
|
|
17
|
+
# @!attribute author_ids
|
|
18
|
+
# IDs of the authors to apply the action to. Provide this or contentIds.
|
|
19
|
+
#
|
|
20
|
+
# @return [Array<String>, nil]
|
|
21
|
+
optional :author_ids, ModerationAPI::Internal::Type::ArrayOf[String], api_name: :authorIds
|
|
22
|
+
|
|
23
|
+
# @!attribute content_ids
|
|
24
|
+
# IDs of the content items to apply the action to. Provide this or authorIds.
|
|
25
|
+
#
|
|
26
|
+
# @return [Array<String>, nil]
|
|
27
|
+
optional :content_ids, ModerationAPI::Internal::Type::ArrayOf[String], api_name: :contentIds
|
|
28
|
+
|
|
29
|
+
# @!attribute duration
|
|
30
|
+
# Optional duration in milliseconds for actions with timeouts
|
|
31
|
+
#
|
|
32
|
+
# @return [Float, nil]
|
|
33
|
+
optional :duration, Float
|
|
34
|
+
|
|
35
|
+
# @!attribute queue_id
|
|
36
|
+
# Optional queue ID if the action is queue-specific
|
|
37
|
+
#
|
|
38
|
+
# @return [String, nil]
|
|
39
|
+
optional :queue_id, String, api_name: :queueId
|
|
40
|
+
|
|
41
|
+
# @!attribute value
|
|
42
|
+
# Optional value to provide with the action
|
|
43
|
+
#
|
|
44
|
+
# @return [String, nil]
|
|
45
|
+
optional :value, String
|
|
46
|
+
|
|
47
|
+
# @!method initialize(action_key:, author_ids: nil, content_ids: nil, duration: nil, queue_id: nil, value: nil, request_options: {})
|
|
48
|
+
# @param action_key [String] ID or key of the action to execute
|
|
49
|
+
#
|
|
50
|
+
# @param author_ids [Array<String>] IDs of the authors to apply the action to. Provide this or contentIds.
|
|
51
|
+
#
|
|
52
|
+
# @param content_ids [Array<String>] IDs of the content items to apply the action to. Provide this or authorIds.
|
|
53
|
+
#
|
|
54
|
+
# @param duration [Float] Optional duration in milliseconds for actions with timeouts
|
|
55
|
+
#
|
|
56
|
+
# @param queue_id [String] Optional queue ID if the action is queue-specific
|
|
57
|
+
#
|
|
58
|
+
# @param value [String] Optional value to provide with the action
|
|
59
|
+
#
|
|
60
|
+
# @param request_options [ModerationAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
module Actions
|
|
6
|
+
# @see ModerationAPI::Resources::Actions::Execute#execute
|
|
7
|
+
class ExecuteExecuteResponse < ModerationAPI::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute success
|
|
9
|
+
# Whether the action was executed successfully
|
|
10
|
+
#
|
|
11
|
+
# @return [Boolean]
|
|
12
|
+
required :success, ModerationAPI::Internal::Type::Boolean
|
|
13
|
+
|
|
14
|
+
# @!method initialize(success:)
|
|
15
|
+
# Execution result
|
|
16
|
+
#
|
|
17
|
+
# @param success [Boolean] Whether the action was executed successfully
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see ModerationAPI::Resources::Auth#create
|
|
6
|
+
class AuthCreateParams < 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,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see ModerationAPI::Resources::Auth#create
|
|
6
|
+
class AuthCreateResponse < ModerationAPI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute message
|
|
8
|
+
# Message of the authentication
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :message, String
|
|
12
|
+
|
|
13
|
+
# @!attribute project
|
|
14
|
+
# Name of the authenticated project
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :project, String
|
|
18
|
+
|
|
19
|
+
# @!attribute status
|
|
20
|
+
# Status of the authentication
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :status, String
|
|
24
|
+
|
|
25
|
+
# @!method initialize(message:, project:, status:)
|
|
26
|
+
# @param message [String] Message of the authentication
|
|
27
|
+
#
|
|
28
|
+
# @param project [String] Name of the authenticated project
|
|
29
|
+
#
|
|
30
|
+
# @param status [String] Status of the authentication
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see ModerationAPI::Resources::Auth#retrieve
|
|
6
|
+
class AuthRetrieveParams < 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,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ModerationAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see ModerationAPI::Resources::Auth#retrieve
|
|
6
|
+
class AuthRetrieveResponse < ModerationAPI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute message
|
|
8
|
+
# Message of the authentication
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :message, String
|
|
12
|
+
|
|
13
|
+
# @!attribute status
|
|
14
|
+
# Status of the authentication
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :status, String
|
|
18
|
+
|
|
19
|
+
# @!method initialize(message:, status:)
|
|
20
|
+
# @param message [String] Message of the authentication
|
|
21
|
+
#
|
|
22
|
+
# @param status [String] Status of the authentication
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|