moderation_api 3.4.0 → 3.5.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/lib/moderation_api/actions.rb +5 -5
- data/lib/moderation_api/channels.rb +9 -0
- data/lib/moderation_api/content.rb +1 -0
- data/lib/moderation_api/guidelines.rb +555 -0
- data/lib/moderation_api/models/components/badrequesterror_code.rb +2 -0
- data/lib/moderation_api/models/components/channel.rb +84 -2
- data/lib/moderation_api/models/components/channel.rbi +42 -0
- data/lib/moderation_api/models/components/channelguideline.rb +55 -0
- data/lib/moderation_api/models/components/channelguideline.rbi +32 -0
- data/lib/moderation_api/models/components/channelpolicy.rb +150 -0
- data/lib/moderation_api/models/components/channelpolicy.rbi +80 -0
- data/lib/moderation_api/models/components/channelpolicy_type.rb +24 -0
- data/lib/moderation_api/models/components/channelpolicy_type.rbi +9 -0
- data/lib/moderation_api/models/components/channelwordlist.rb +96 -0
- data/lib/moderation_api/models/components/channelwordlist.rbi +50 -0
- data/lib/moderation_api/models/components/channelwordlist_type.rb +22 -0
- data/lib/moderation_api/models/components/channelwordlist_type.rbi +9 -0
- data/lib/moderation_api/models/components/condition.rb +68 -0
- data/lib/moderation_api/models/components/condition.rbi +26 -0
- data/lib/moderation_api/models/components/format.rb +20 -0
- data/lib/moderation_api/models/components/format.rbi +9 -0
- data/lib/moderation_api/models/components/notfounderror_code.rb +6 -0
- data/lib/moderation_api/models/components/permissiondeniederror_code.rb +2 -0
- data/lib/moderation_api/models/components/rule.rb +150 -0
- data/lib/moderation_api/models/components/rule.rbi +80 -0
- data/lib/moderation_api/models/components/rule_action.rb +22 -0
- data/lib/moderation_api/models/components/rule_action.rbi +9 -0
- data/lib/moderation_api/models/components/rule_operator.rb +28 -0
- data/lib/moderation_api/models/components/rule_operator.rbi +9 -0
- data/lib/moderation_api/models/components/rule_value_1.rb +25 -0
- data/lib/moderation_api/models/components/rule_value_1.rbi +9 -0
- data/lib/moderation_api/models/components/rule_value_2.rb +25 -0
- data/lib/moderation_api/models/components/rule_value_2.rbi +9 -0
- data/lib/moderation_api/models/components/rulecondition.rb +69 -0
- data/lib/moderation_api/models/components/rulecondition.rbi +26 -0
- data/lib/moderation_api/models/components/rulecondition_operator.rb +24 -0
- data/lib/moderation_api/models/components/rulecondition_operator.rbi +9 -0
- data/lib/moderation_api/models/components/rulecondition_value_1.rb +25 -0
- data/lib/moderation_api/models/components/rulecondition_value_1.rbi +9 -0
- data/lib/moderation_api/models/components/rulecondition_value_2.rb +25 -0
- data/lib/moderation_api/models/components/rulecondition_value_2.rbi +9 -0
- data/lib/moderation_api/models/components/ruledefaultaction.rb +22 -0
- data/lib/moderation_api/models/components/ruledefaultaction.rbi +9 -0
- data/lib/moderation_api/models/components/ruleevaluationmode.rb +21 -0
- data/lib/moderation_api/models/components/ruleevaluationmode.rbi +9 -0
- data/lib/moderation_api/models/components/rulefield.rb +106 -0
- data/lib/moderation_api/models/components/rulefield.rbi +50 -0
- data/lib/moderation_api/models/components/rulefield_operator.rb +27 -0
- data/lib/moderation_api/models/components/rulefield_operator.rbi +9 -0
- data/lib/moderation_api/models/components/rulefield_type.rb +24 -0
- data/lib/moderation_api/models/components/rulefield_type.rbi +9 -0
- data/lib/moderation_api/models/components.rb +21 -0
- data/lib/moderation_api/models/errors/badrequesterror.rb +1 -0
- data/lib/moderation_api/models/errors/notfounderror.rb +3 -0
- data/lib/moderation_api/models/errors/permissiondeniederror.rb +1 -0
- data/lib/moderation_api/models/operations/actual.rb +50 -0
- data/lib/moderation_api/models/operations/actual.rbi +26 -0
- data/lib/moderation_api/models/operations/brand_status.rb +21 -0
- data/lib/moderation_api/models/operations/brand_status.rbi +9 -0
- data/lib/moderation_api/models/operations/campaign_request.rb +63 -0
- data/lib/moderation_api/models/operations/campaign_request.rbi +32 -0
- data/lib/moderation_api/models/operations/campaign_response.rb +84 -0
- data/lib/moderation_api/models/operations/campaign_response.rbi +38 -0
- data/lib/moderation_api/models/operations/campaign_status.rb +21 -0
- data/lib/moderation_api/models/operations/campaign_status.rbi +9 -0
- data/lib/moderation_api/models/operations/clientaction.rb +3 -3
- data/lib/moderation_api/models/operations/clientaction_action.rb +19 -0
- data/lib/moderation_api/models/operations/clientaction_action.rbi +9 -0
- data/lib/moderation_api/models/operations/cluster.rb +69 -0
- data/lib/moderation_api/models/operations/cluster.rbi +32 -0
- data/lib/moderation_api/models/operations/cluster_status.rb +23 -0
- data/lib/moderation_api/models/operations/cluster_status.rbi +9 -0
- data/lib/moderation_api/models/operations/createrule_action.rb +19 -0
- data/lib/moderation_api/models/operations/createrule_action.rbi +9 -0
- data/lib/moderation_api/models/operations/createrule_request.rb +45 -0
- data/lib/moderation_api/models/operations/createrule_request.rbi +26 -0
- data/lib/moderation_api/models/operations/createrule_requestbody.rb +100 -0
- data/lib/moderation_api/models/operations/createrule_requestbody.rbi +50 -0
- data/lib/moderation_api/models/operations/createrule_response.rb +51 -0
- data/lib/moderation_api/models/operations/createrule_response.rbi +32 -0
- data/lib/moderation_api/models/operations/deleterule_request.rb +39 -0
- data/lib/moderation_api/models/operations/deleterule_request.rbi +20 -0
- data/lib/moderation_api/models/operations/deleterule_response.rb +51 -0
- data/lib/moderation_api/models/operations/deleterule_response.rbi +32 -0
- data/lib/moderation_api/models/operations/deleterule_responsebody.rb +39 -0
- data/lib/moderation_api/models/operations/deleterule_responsebody.rbi +20 -0
- data/lib/moderation_api/models/operations/evaluationmode.rb +18 -0
- data/lib/moderation_api/models/operations/evaluationmode.rbi +9 -0
- data/lib/moderation_api/models/operations/getanalyticsautomation_responsebody.rb +2 -2
- data/lib/moderation_api/models/operations/{rule.rb → getanalyticsautomation_rule.rb} +1 -1
- data/lib/moderation_api/models/operations/{rule.rbi → getanalyticsautomation_rule.rbi} +2 -2
- data/lib/moderation_api/models/operations/getchannelguidelines_request.rb +31 -0
- data/lib/moderation_api/models/operations/getchannelguidelines_request.rbi +14 -0
- data/lib/moderation_api/models/operations/getchannelguidelines_response.rb +51 -0
- data/lib/moderation_api/models/operations/getchannelguidelines_response.rbi +32 -0
- data/lib/moderation_api/models/operations/getchannelguidelines_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/getchannelguidelines_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/getchannelpolicies_request.rb +31 -0
- data/lib/moderation_api/models/operations/getchannelpolicies_request.rbi +14 -0
- data/lib/moderation_api/models/operations/getchannelpolicies_response.rb +51 -0
- data/lib/moderation_api/models/operations/getchannelpolicies_response.rbi +32 -0
- data/lib/moderation_api/models/operations/getchannelpolicies_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/getchannelpolicies_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/getchannelwordlists_request.rb +31 -0
- data/lib/moderation_api/models/operations/getchannelwordlists_request.rbi +14 -0
- data/lib/moderation_api/models/operations/getchannelwordlists_response.rb +51 -0
- data/lib/moderation_api/models/operations/getchannelwordlists_response.rbi +32 -0
- data/lib/moderation_api/models/operations/getchannelwordlists_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/getchannelwordlists_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/getrule_request.rb +39 -0
- data/lib/moderation_api/models/operations/getrule_request.rbi +20 -0
- data/lib/moderation_api/models/operations/getrule_response.rb +51 -0
- data/lib/moderation_api/models/operations/getrule_response.rbi +32 -0
- data/lib/moderation_api/models/operations/getrulefields_request.rb +39 -0
- data/lib/moderation_api/models/operations/getrulefields_request.rbi +20 -0
- data/lib/moderation_api/models/operations/getrulefields_response.rb +51 -0
- data/lib/moderation_api/models/operations/getrulefields_response.rbi +32 -0
- data/lib/moderation_api/models/operations/getrulefields_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/getrulefields_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/listrules_request.rb +63 -0
- data/lib/moderation_api/models/operations/listrules_request.rbi +32 -0
- data/lib/moderation_api/models/operations/listrules_response.rb +63 -0
- data/lib/moderation_api/models/operations/listrules_response.rbi +32 -0
- data/lib/moderation_api/models/operations/listrules_responsebody.rb +43 -0
- data/lib/moderation_api/models/operations/listrules_responsebody.rbi +20 -0
- data/lib/moderation_api/models/operations/policyid.rb +25 -0
- data/lib/moderation_api/models/operations/policyid.rbi +9 -0
- data/lib/moderation_api/models/operations/reason_code_enum.rb +3 -0
- data/lib/moderation_api/models/operations/{action_request.rb → ruledefaultaction.rb} +2 -2
- data/lib/moderation_api/models/operations/ruledefaultaction.rbi +9 -0
- data/lib/moderation_api/models/operations/ruleevaluationmode.rb +18 -0
- data/lib/moderation_api/models/operations/ruleevaluationmode.rbi +9 -0
- data/lib/moderation_api/models/operations/signal.rb +25 -0
- data/lib/moderation_api/models/operations/signal.rbi +9 -0
- data/lib/moderation_api/models/operations/simulated.rb +50 -0
- data/lib/moderation_api/models/operations/simulated.rbi +26 -0
- data/lib/moderation_api/models/operations/simulaterules_action.rb +19 -0
- data/lib/moderation_api/models/operations/simulaterules_action.rbi +9 -0
- data/lib/moderation_api/models/operations/simulaterules_request.rb +45 -0
- data/lib/moderation_api/models/operations/simulaterules_request.rbi +26 -0
- data/lib/moderation_api/models/operations/simulaterules_requestbody.rb +54 -0
- data/lib/moderation_api/models/operations/simulaterules_requestbody.rbi +20 -0
- data/lib/moderation_api/models/operations/simulaterules_response.rb +51 -0
- data/lib/moderation_api/models/operations/simulaterules_response.rbi +32 -0
- data/lib/moderation_api/models/operations/simulaterules_responsebody.rb +67 -0
- data/lib/moderation_api/models/operations/simulaterules_responsebody.rbi +32 -0
- data/lib/moderation_api/models/operations/simulaterules_rule.rb +82 -0
- data/lib/moderation_api/models/operations/simulaterules_rule.rbi +38 -0
- data/lib/moderation_api/models/operations/sort.rb +1 -0
- data/lib/moderation_api/models/operations/{guideline.rb → submitcontent_guideline.rb} +1 -1
- data/lib/moderation_api/models/operations/{guideline.rbi → submitcontent_guideline.rbi} +2 -2
- data/lib/moderation_api/models/operations/{policy_request.rb → submitcontent_policy_request.rb} +1 -1
- data/lib/moderation_api/models/operations/submitcontent_policy_request.rbi +9 -0
- data/lib/moderation_api/models/operations/submitcontent_requestbody.rb +13 -3
- data/lib/moderation_api/models/operations/submitcontent_requestbody.rbi +6 -0
- data/lib/moderation_api/models/operations/submitcontent_responsebody.rb +12 -2
- data/lib/moderation_api/models/operations/submitcontent_responsebody.rbi +6 -0
- data/lib/moderation_api/models/operations/timerange.rb +38 -0
- data/lib/moderation_api/models/operations/timerange.rbi +20 -0
- data/lib/moderation_api/models/operations/updatechannel_requestbody.rb +82 -2
- data/lib/moderation_api/models/operations/updatechannel_requestbody.rbi +42 -0
- data/lib/moderation_api/models/operations/updatechannelguidelines_guideline.rb +72 -0
- data/lib/moderation_api/models/operations/updatechannelguidelines_guideline.rbi +38 -0
- data/lib/moderation_api/models/operations/updatechannelguidelines_request.rb +39 -0
- data/lib/moderation_api/models/operations/updatechannelguidelines_request.rbi +20 -0
- data/lib/moderation_api/models/operations/updatechannelguidelines_requestbody.rb +35 -0
- data/lib/moderation_api/models/operations/updatechannelguidelines_requestbody.rbi +14 -0
- data/lib/moderation_api/models/operations/updatechannelguidelines_response.rb +51 -0
- data/lib/moderation_api/models/operations/updatechannelguidelines_response.rbi +32 -0
- data/lib/moderation_api/models/operations/updatechannelguidelines_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/updatechannelguidelines_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/updatechannelpolicies_policy.rb +72 -0
- data/lib/moderation_api/models/operations/updatechannelpolicies_policy.rbi +38 -0
- data/lib/moderation_api/models/operations/updatechannelpolicies_request.rb +39 -0
- data/lib/moderation_api/models/operations/updatechannelpolicies_request.rbi +20 -0
- data/lib/moderation_api/models/operations/updatechannelpolicies_requestbody.rb +35 -0
- data/lib/moderation_api/models/operations/updatechannelpolicies_requestbody.rbi +14 -0
- data/lib/moderation_api/models/operations/updatechannelpolicies_response.rb +51 -0
- data/lib/moderation_api/models/operations/updatechannelpolicies_response.rbi +32 -0
- data/lib/moderation_api/models/operations/updatechannelpolicies_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/updatechannelpolicies_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/updatechannelwordlists_request.rb +39 -0
- data/lib/moderation_api/models/operations/updatechannelwordlists_request.rbi +20 -0
- data/lib/moderation_api/models/operations/updatechannelwordlists_requestbody.rb +35 -0
- data/lib/moderation_api/models/operations/updatechannelwordlists_requestbody.rbi +14 -0
- data/lib/moderation_api/models/operations/updatechannelwordlists_response.rb +51 -0
- data/lib/moderation_api/models/operations/updatechannelwordlists_response.rbi +32 -0
- data/lib/moderation_api/models/operations/updatechannelwordlists_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/updatechannelwordlists_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/updatechannelwordlists_type.rb +19 -0
- data/lib/moderation_api/models/operations/updatechannelwordlists_type.rbi +9 -0
- data/lib/moderation_api/models/operations/updaterule_action.rb +19 -0
- data/lib/moderation_api/models/operations/updaterule_action.rbi +9 -0
- data/lib/moderation_api/models/operations/updaterule_request.rb +45 -0
- data/lib/moderation_api/models/operations/updaterule_request.rbi +26 -0
- data/lib/moderation_api/models/operations/updaterule_requestbody.rb +90 -0
- data/lib/moderation_api/models/operations/updaterule_requestbody.rbi +44 -0
- data/lib/moderation_api/models/operations/updaterule_response.rb +51 -0
- data/lib/moderation_api/models/operations/updaterule_response.rbi +32 -0
- data/lib/moderation_api/models/operations/upgradechannelpolicy_request.rb +39 -0
- data/lib/moderation_api/models/operations/upgradechannelpolicy_request.rbi +20 -0
- data/lib/moderation_api/models/operations/upgradechannelpolicy_response.rb +51 -0
- data/lib/moderation_api/models/operations/upgradechannelpolicy_response.rbi +32 -0
- data/lib/moderation_api/models/operations/upgradechannelpolicy_responsebody.rb +43 -0
- data/lib/moderation_api/models/operations/upgradechannelpolicy_responsebody.rbi +20 -0
- data/lib/moderation_api/models/operations/wordlist.rb +81 -0
- data/lib/moderation_api/models/operations/wordlist.rbi +38 -0
- data/lib/moderation_api/models/operations.rb +98 -4
- data/lib/moderation_api/moderationapi.rb +3 -1
- data/lib/moderation_api/policies.rb +818 -0
- data/lib/moderation_api/rules.rb +1860 -0
- data/lib/moderation_api/sdkconfiguration.rb +2 -2
- data/lib/moderation_api/wordlists.rb +555 -0
- data/lib/moderation_api.rb +4 -0
- metadata +190 -10
- data/lib/moderation_api/models/operations/action_request.rbi +0 -9
- data/lib/moderation_api/models/operations/policy_request.rbi +0 -9
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class GetChannelWordlistsRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The ID of the channel.
|
|
15
|
+
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
|
|
17
|
+
sig { params(id: ::String).void }
|
|
18
|
+
def initialize(id:)
|
|
19
|
+
@id = id
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
23
|
+
def ==(other)
|
|
24
|
+
return false unless other.is_a?(self.class)
|
|
25
|
+
return false unless @id == other.id
|
|
26
|
+
true
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetChannelWordlistsRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetChannelWordlistsRequest
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class GetChannelWordlistsResponse
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# HTTP response content type for this operation
|
|
15
|
+
field :content_type, ::String
|
|
16
|
+
# HTTP response status code for this operation
|
|
17
|
+
field :status_code, ::Integer
|
|
18
|
+
# Raw HTTP response; suitable for custom response parsing
|
|
19
|
+
field :raw_response, ::Faraday::Response
|
|
20
|
+
# Wordlists retrieved successfully
|
|
21
|
+
field :object, Crystalline::Nilable.new(Models::Operations::GetChannelWordlistsResponseBody)
|
|
22
|
+
|
|
23
|
+
sig {
|
|
24
|
+
params(
|
|
25
|
+
content_type: ::String,
|
|
26
|
+
status_code: ::Integer,
|
|
27
|
+
raw_response: ::Faraday::Response,
|
|
28
|
+
object: T.nilable(Models::Operations::GetChannelWordlistsResponseBody)
|
|
29
|
+
)
|
|
30
|
+
.void
|
|
31
|
+
}
|
|
32
|
+
def initialize(content_type:, status_code:, raw_response:, object: nil)
|
|
33
|
+
@content_type = content_type
|
|
34
|
+
@status_code = status_code
|
|
35
|
+
@raw_response = raw_response
|
|
36
|
+
@object = object
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
40
|
+
def ==(other)
|
|
41
|
+
return false unless other.is_a?(self.class)
|
|
42
|
+
return false unless @content_type == other.content_type
|
|
43
|
+
return false unless @status_code == other.status_code
|
|
44
|
+
return false unless @raw_response == other.raw_response
|
|
45
|
+
return false unless @object == other.object
|
|
46
|
+
true
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetChannelWordlistsResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetChannelWordlistsResponse
|
|
9
|
+
def content_type
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def content_type=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def status_code
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def status_code=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def raw_response
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def raw_response=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def object
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def object=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
# Wordlists retrieved successfully
|
|
10
|
+
class GetChannelWordlistsResponseBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Every wordlist in the organization, with whether the channel uses it. Wordlists the channel does not use show the default settings.
|
|
15
|
+
field(
|
|
16
|
+
:wordlists,
|
|
17
|
+
Crystalline::Array.new(Models::Components::ChannelWordlist),
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("wordlists"), required: true}}
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
sig { params(wordlists: T::Array[Models::Components::ChannelWordlist]).void }
|
|
22
|
+
def initialize(wordlists:)
|
|
23
|
+
@wordlists = wordlists
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
27
|
+
def ==(other)
|
|
28
|
+
return false unless other.is_a?(self.class)
|
|
29
|
+
return false unless @wordlists == other.wordlists
|
|
30
|
+
true
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetChannelWordlistsResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetChannelWordlistsResponseBody
|
|
9
|
+
def wordlists
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def wordlists=(str_)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class GetRuleRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The ID of the rule.
|
|
15
|
+
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
# The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.
|
|
17
|
+
field(
|
|
18
|
+
:project_id,
|
|
19
|
+
Crystalline::Nilable.new(::String),
|
|
20
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
sig { params(id: ::String, project_id: T.nilable(::String)).void }
|
|
24
|
+
def initialize(id:, project_id: nil)
|
|
25
|
+
@id = id
|
|
26
|
+
@project_id = project_id
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
30
|
+
def ==(other)
|
|
31
|
+
return false unless other.is_a?(self.class)
|
|
32
|
+
return false unless @id == other.id
|
|
33
|
+
return false unless @project_id == other.project_id
|
|
34
|
+
true
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetRuleRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetRuleRequest
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def project_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def project_id=(str_)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class GetRuleResponse
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# HTTP response content type for this operation
|
|
15
|
+
field :content_type, ::String
|
|
16
|
+
# HTTP response status code for this operation
|
|
17
|
+
field :status_code, ::Integer
|
|
18
|
+
# Raw HTTP response; suitable for custom response parsing
|
|
19
|
+
field :raw_response, ::Faraday::Response
|
|
20
|
+
# Rule retrieved successfully
|
|
21
|
+
field :rule, Crystalline::Nilable.new(Models::Components::Rule)
|
|
22
|
+
|
|
23
|
+
sig {
|
|
24
|
+
params(
|
|
25
|
+
content_type: ::String,
|
|
26
|
+
status_code: ::Integer,
|
|
27
|
+
raw_response: ::Faraday::Response,
|
|
28
|
+
rule: T.nilable(Models::Components::Rule)
|
|
29
|
+
)
|
|
30
|
+
.void
|
|
31
|
+
}
|
|
32
|
+
def initialize(content_type:, status_code:, raw_response:, rule: nil)
|
|
33
|
+
@content_type = content_type
|
|
34
|
+
@status_code = status_code
|
|
35
|
+
@raw_response = raw_response
|
|
36
|
+
@rule = rule
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
40
|
+
def ==(other)
|
|
41
|
+
return false unless other.is_a?(self.class)
|
|
42
|
+
return false unless @content_type == other.content_type
|
|
43
|
+
return false unless @status_code == other.status_code
|
|
44
|
+
return false unless @raw_response == other.raw_response
|
|
45
|
+
return false unless @rule == other.rule
|
|
46
|
+
true
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetRuleResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetRuleResponse
|
|
9
|
+
def content_type
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def content_type=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def status_code
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def status_code=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def raw_response
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def raw_response=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def rule
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def rule=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class GetRuleFieldsRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The ID of the channel.
|
|
15
|
+
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
# The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.
|
|
17
|
+
field(
|
|
18
|
+
:project_id,
|
|
19
|
+
Crystalline::Nilable.new(::String),
|
|
20
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
sig { params(id: ::String, project_id: T.nilable(::String)).void }
|
|
24
|
+
def initialize(id:, project_id: nil)
|
|
25
|
+
@id = id
|
|
26
|
+
@project_id = project_id
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
30
|
+
def ==(other)
|
|
31
|
+
return false unless other.is_a?(self.class)
|
|
32
|
+
return false unless @id == other.id
|
|
33
|
+
return false unless @project_id == other.project_id
|
|
34
|
+
true
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetRuleFieldsRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetRuleFieldsRequest
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def project_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def project_id=(str_)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class GetRuleFieldsResponse
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# HTTP response content type for this operation
|
|
15
|
+
field :content_type, ::String
|
|
16
|
+
# HTTP response status code for this operation
|
|
17
|
+
field :status_code, ::Integer
|
|
18
|
+
# Raw HTTP response; suitable for custom response parsing
|
|
19
|
+
field :raw_response, ::Faraday::Response
|
|
20
|
+
# Rule fields retrieved successfully
|
|
21
|
+
field :object, Crystalline::Nilable.new(Models::Operations::GetRuleFieldsResponseBody)
|
|
22
|
+
|
|
23
|
+
sig {
|
|
24
|
+
params(
|
|
25
|
+
content_type: ::String,
|
|
26
|
+
status_code: ::Integer,
|
|
27
|
+
raw_response: ::Faraday::Response,
|
|
28
|
+
object: T.nilable(Models::Operations::GetRuleFieldsResponseBody)
|
|
29
|
+
)
|
|
30
|
+
.void
|
|
31
|
+
}
|
|
32
|
+
def initialize(content_type:, status_code:, raw_response:, object: nil)
|
|
33
|
+
@content_type = content_type
|
|
34
|
+
@status_code = status_code
|
|
35
|
+
@raw_response = raw_response
|
|
36
|
+
@object = object
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
40
|
+
def ==(other)
|
|
41
|
+
return false unless other.is_a?(self.class)
|
|
42
|
+
return false unless @content_type == other.content_type
|
|
43
|
+
return false unless @status_code == other.status_code
|
|
44
|
+
return false unless @raw_response == other.raw_response
|
|
45
|
+
return false unless @object == other.object
|
|
46
|
+
true
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetRuleFieldsResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetRuleFieldsResponse
|
|
9
|
+
def content_type
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def content_type=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def status_code
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def status_code=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def raw_response
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def raw_response=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def object
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def object=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
# Rule fields retrieved successfully
|
|
10
|
+
class GetRuleFieldsResponseBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The fields a rule condition on this channel can read. They follow the channel's policies.
|
|
15
|
+
field(
|
|
16
|
+
:fields_,
|
|
17
|
+
Crystalline::Array.new(Models::Components::RuleField),
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("fields"), required: true}}
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
sig { params(fields_: T::Array[Models::Components::RuleField]).void }
|
|
22
|
+
def initialize(fields_:)
|
|
23
|
+
@fields_ = fields_
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
27
|
+
def ==(other)
|
|
28
|
+
return false unless other.is_a?(self.class)
|
|
29
|
+
return false unless @fields_ == other.fields_
|
|
30
|
+
true
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetRuleFieldsResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetRuleFieldsResponseBody
|
|
9
|
+
def fields_
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def fields_=(str_)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class ListRulesRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The ID of the channel.
|
|
15
|
+
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
# The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.
|
|
17
|
+
field(
|
|
18
|
+
:project_id,
|
|
19
|
+
Crystalline::Nilable.new(::String),
|
|
20
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
field(
|
|
24
|
+
:page,
|
|
25
|
+
Crystalline::Nilable.new(::Integer),
|
|
26
|
+
{'query_param': {'field_name': "page", 'style': "form", 'explode': true}}
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
field(
|
|
30
|
+
:page_size,
|
|
31
|
+
Crystalline::Nilable.new(::Integer),
|
|
32
|
+
{'query_param': {'field_name': "pageSize", 'style': "form", 'explode': true}}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
sig {
|
|
36
|
+
params(
|
|
37
|
+
id: ::String,
|
|
38
|
+
project_id: T.nilable(::String),
|
|
39
|
+
page: T.nilable(::Integer),
|
|
40
|
+
page_size: T.nilable(::Integer)
|
|
41
|
+
)
|
|
42
|
+
.void
|
|
43
|
+
}
|
|
44
|
+
def initialize(id:, project_id: nil, page: 1, page_size: 20)
|
|
45
|
+
@id = id
|
|
46
|
+
@project_id = project_id
|
|
47
|
+
@page = page
|
|
48
|
+
@page_size = page_size
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
52
|
+
def ==(other)
|
|
53
|
+
return false unless other.is_a?(self.class)
|
|
54
|
+
return false unless @id == other.id
|
|
55
|
+
return false unless @project_id == other.project_id
|
|
56
|
+
return false unless @page == other.page
|
|
57
|
+
return false unless @page_size == other.page_size
|
|
58
|
+
true
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::ListRulesRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::ListRulesRequest
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def project_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def project_id=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def page
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def page=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def page_size
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def page_size=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class ListRulesResponse
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
sig { returns(T.proc.returns(T.nilable(ListRulesResponse))) }
|
|
14
|
+
attr_accessor :next_page
|
|
15
|
+
|
|
16
|
+
# HTTP response content type for this operation
|
|
17
|
+
field :content_type, ::String
|
|
18
|
+
# HTTP response status code for this operation
|
|
19
|
+
field :status_code, ::Integer
|
|
20
|
+
# Raw HTTP response; suitable for custom response parsing
|
|
21
|
+
field :raw_response, ::Faraday::Response
|
|
22
|
+
# Rules retrieved successfully
|
|
23
|
+
field :object, Crystalline::Nilable.new(Models::Operations::ListRulesResponseBody)
|
|
24
|
+
|
|
25
|
+
sig {
|
|
26
|
+
params(
|
|
27
|
+
content_type: ::String,
|
|
28
|
+
status_code: ::Integer,
|
|
29
|
+
raw_response: ::Faraday::Response,
|
|
30
|
+
object: T.nilable(Models::Operations::ListRulesResponseBody)
|
|
31
|
+
)
|
|
32
|
+
.void
|
|
33
|
+
}
|
|
34
|
+
def initialize(content_type:, status_code:, raw_response:, object: nil)
|
|
35
|
+
@content_type = content_type
|
|
36
|
+
@status_code = status_code
|
|
37
|
+
@raw_response = raw_response
|
|
38
|
+
@object = object
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
42
|
+
def ==(other)
|
|
43
|
+
return false unless other.is_a?(self.class)
|
|
44
|
+
return false unless @content_type == other.content_type
|
|
45
|
+
return false unless @status_code == other.status_code
|
|
46
|
+
return false unless @raw_response == other.raw_response
|
|
47
|
+
return false unless @object == other.object
|
|
48
|
+
true
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def each
|
|
52
|
+
page = self
|
|
53
|
+
loop do
|
|
54
|
+
yield page
|
|
55
|
+
next_page = page.next_page.call if page.next_page
|
|
56
|
+
break if next_page.nil?
|
|
57
|
+
page = T.must(next_page)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|