moderation_api 3.2.0 → 3.4.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/authors.rb +759 -0
- data/lib/moderation_api/content.rb +506 -0
- data/lib/moderation_api/items.rb +4 -4
- data/lib/moderation_api/models/components/queueitem.rb +2 -2
- data/lib/moderation_api/models/operations/allowcontent_request.rb +45 -0
- data/lib/moderation_api/models/operations/allowcontent_request.rbi +26 -0
- data/lib/moderation_api/models/operations/allowcontent_requestbody.rb +67 -0
- data/lib/moderation_api/models/operations/allowcontent_requestbody.rbi +32 -0
- data/lib/moderation_api/models/operations/allowcontent_response.rb +51 -0
- data/lib/moderation_api/models/operations/allowcontent_response.rbi +32 -0
- data/lib/moderation_api/models/operations/allowcontent_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/allowcontent_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/blockauthor_request.rb +45 -0
- data/lib/moderation_api/models/operations/blockauthor_request.rbi +26 -0
- data/lib/moderation_api/models/operations/blockauthor_requestbody.rb +35 -0
- data/lib/moderation_api/models/operations/blockauthor_requestbody.rbi +14 -0
- data/lib/moderation_api/models/operations/blockauthor_response.rb +51 -0
- data/lib/moderation_api/models/operations/blockauthor_response.rbi +32 -0
- data/lib/moderation_api/models/operations/blockauthor_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/blockauthor_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/deletewordlist_request.rb +39 -0
- data/lib/moderation_api/models/operations/deletewordlist_request.rbi +20 -0
- data/lib/moderation_api/models/operations/deletewordlist_response.rb +51 -0
- data/lib/moderation_api/models/operations/deletewordlist_response.rbi +32 -0
- data/lib/moderation_api/models/operations/deletewordlist_responsebody.rb +47 -0
- data/lib/moderation_api/models/operations/deletewordlist_responsebody.rbi +26 -0
- data/lib/moderation_api/models/operations/executeaction_requestbody.rb +29 -2
- data/lib/moderation_api/models/operations/executeaction_requestbody.rbi +12 -0
- data/lib/moderation_api/models/operations/rejectcontent_request.rb +45 -0
- data/lib/moderation_api/models/operations/rejectcontent_request.rbi +26 -0
- data/lib/moderation_api/models/operations/rejectcontent_requestbody.rb +67 -0
- data/lib/moderation_api/models/operations/rejectcontent_requestbody.rbi +32 -0
- data/lib/moderation_api/models/operations/rejectcontent_response.rb +51 -0
- data/lib/moderation_api/models/operations/rejectcontent_response.rbi +32 -0
- data/lib/moderation_api/models/operations/rejectcontent_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/rejectcontent_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/resolvequeueitem_request.rb +1 -1
- data/lib/moderation_api/models/operations/resolvequeueitems_requestbody.rb +1 -1
- data/lib/moderation_api/models/operations/resolvequeueitems_responsebody.rb +1 -1
- data/lib/moderation_api/models/operations/suspendauthor_request.rb +45 -0
- data/lib/moderation_api/models/operations/suspendauthor_request.rbi +26 -0
- data/lib/moderation_api/models/operations/suspendauthor_requestbody.rb +43 -0
- data/lib/moderation_api/models/operations/suspendauthor_requestbody.rbi +20 -0
- data/lib/moderation_api/models/operations/suspendauthor_response.rb +51 -0
- data/lib/moderation_api/models/operations/suspendauthor_response.rbi +32 -0
- data/lib/moderation_api/models/operations/suspendauthor_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/suspendauthor_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/unblockauthor_request.rb +45 -0
- data/lib/moderation_api/models/operations/unblockauthor_request.rbi +26 -0
- data/lib/moderation_api/models/operations/unblockauthor_requestbody.rb +35 -0
- data/lib/moderation_api/models/operations/unblockauthor_requestbody.rbi +14 -0
- data/lib/moderation_api/models/operations/unblockauthor_response.rb +51 -0
- data/lib/moderation_api/models/operations/unblockauthor_response.rbi +32 -0
- data/lib/moderation_api/models/operations/unblockauthor_responsebody.rb +35 -0
- data/lib/moderation_api/models/operations/unblockauthor_responsebody.rbi +14 -0
- data/lib/moderation_api/models/operations/unicode_spoofing.rb +1 -1
- data/lib/moderation_api/models/operations/unresolvequeueitem_request.rb +1 -1
- data/lib/moderation_api/models/operations.rb +23 -0
- data/lib/moderation_api/moderationapi.rb +3 -3
- data/lib/moderation_api/sdkconfiguration.rb +2 -2
- data/lib/moderation_api/wordlist.rb +216 -0
- data/lib/moderation_api.rb +1 -1
- metadata +48 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::DeleteWordlistResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::DeleteWordlistResponseBody
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def deleted
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def deleted=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def detached_channel_ids
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def detached_channel_ids=(str_)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -47,6 +47,18 @@ module ModerationApi
|
|
|
47
47
|
Crystalline::Nilable.new(::Float),
|
|
48
48
|
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("duration")}}
|
|
49
49
|
)
|
|
50
|
+
# The user ID or email of the organization member who made the decision. The action is recorded as theirs.
|
|
51
|
+
field(
|
|
52
|
+
:moderator,
|
|
53
|
+
Crystalline::Nilable.new(::String),
|
|
54
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("moderator")}}
|
|
55
|
+
)
|
|
56
|
+
# Record an allow or reject decision as a casebook case. Defaults to true when `moderator` is set, else false. Without `moderator`, the case is recorded as System.
|
|
57
|
+
field(
|
|
58
|
+
:create_casebook_case,
|
|
59
|
+
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
60
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("createCasebookCase")}}
|
|
61
|
+
)
|
|
50
62
|
|
|
51
63
|
sig {
|
|
52
64
|
params(
|
|
@@ -55,17 +67,30 @@ module ModerationApi
|
|
|
55
67
|
author_ids: T.nilable(T::Array[::String]),
|
|
56
68
|
value: T.nilable(::String),
|
|
57
69
|
queue_id: T.nilable(::String),
|
|
58
|
-
duration: T.nilable(::Float)
|
|
70
|
+
duration: T.nilable(::Float),
|
|
71
|
+
moderator: T.nilable(::String),
|
|
72
|
+
create_casebook_case: T.nilable(T::Boolean)
|
|
59
73
|
)
|
|
60
74
|
.void
|
|
61
75
|
}
|
|
62
|
-
def initialize(
|
|
76
|
+
def initialize(
|
|
77
|
+
action_key:,
|
|
78
|
+
content_ids: nil,
|
|
79
|
+
author_ids: nil,
|
|
80
|
+
value: nil,
|
|
81
|
+
queue_id: nil,
|
|
82
|
+
duration: nil,
|
|
83
|
+
moderator: nil,
|
|
84
|
+
create_casebook_case: nil
|
|
85
|
+
)
|
|
63
86
|
@action_key = action_key
|
|
64
87
|
@content_ids = content_ids
|
|
65
88
|
@author_ids = author_ids
|
|
66
89
|
@value = value
|
|
67
90
|
@queue_id = queue_id
|
|
68
91
|
@duration = duration
|
|
92
|
+
@moderator = moderator
|
|
93
|
+
@create_casebook_case = create_casebook_case
|
|
69
94
|
end
|
|
70
95
|
|
|
71
96
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -77,6 +102,8 @@ module ModerationApi
|
|
|
77
102
|
return false unless @value == other.value
|
|
78
103
|
return false unless @queue_id == other.queue_id
|
|
79
104
|
return false unless @duration == other.duration
|
|
105
|
+
return false unless @moderator == other.moderator
|
|
106
|
+
return false unless @create_casebook_case == other.create_casebook_case
|
|
80
107
|
true
|
|
81
108
|
end
|
|
82
109
|
end
|
|
@@ -41,4 +41,16 @@ class ModerationApi::Models::Operations::ExecuteActionRequestBody
|
|
|
41
41
|
|
|
42
42
|
def duration=(str_)
|
|
43
43
|
end
|
|
44
|
+
|
|
45
|
+
def moderator
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def moderator=(str_)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def create_casebook_case
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def create_casebook_case=(str_)
|
|
55
|
+
end
|
|
44
56
|
end
|
|
@@ -0,0 +1,45 @@
|
|
|
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 RejectContentRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The content ID you sent when you submitted the content, or the ID Moderation API assigned.
|
|
15
|
+
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
|
|
17
|
+
field :body, Models::Operations::RejectContentRequestBody, {'request': {'media_type': "application/json"}}
|
|
18
|
+
# The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.
|
|
19
|
+
field(
|
|
20
|
+
:project_id,
|
|
21
|
+
Crystalline::Nilable.new(::String),
|
|
22
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
sig {
|
|
26
|
+
params(id: ::String, body: Models::Operations::RejectContentRequestBody, project_id: T.nilable(::String)).void
|
|
27
|
+
}
|
|
28
|
+
def initialize(id:, body:, project_id: nil)
|
|
29
|
+
@id = id
|
|
30
|
+
@body = body
|
|
31
|
+
@project_id = project_id
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
35
|
+
def ==(other)
|
|
36
|
+
return false unless other.is_a?(self.class)
|
|
37
|
+
return false unless @id == other.id
|
|
38
|
+
return false unless @body == other.body
|
|
39
|
+
return false unless @project_id == other.project_id
|
|
40
|
+
true
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::RejectContentRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::RejectContentRequest
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def body
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def body=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def project_id
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def project_id=(str_)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
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 RejectContentRequestBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Why the action was taken. Saved with the action and sent in the webhook event.
|
|
15
|
+
field(
|
|
16
|
+
:reason,
|
|
17
|
+
Crystalline::Nilable.new(::String),
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("reason")}}
|
|
19
|
+
)
|
|
20
|
+
# The queue the content is reviewed in. Defaults to the project's default queue.
|
|
21
|
+
field(
|
|
22
|
+
:queue_id,
|
|
23
|
+
Crystalline::Nilable.new(::String),
|
|
24
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("queueId")}}
|
|
25
|
+
)
|
|
26
|
+
# The user ID or email of the organization member who made the decision. The action is recorded as theirs.
|
|
27
|
+
field(
|
|
28
|
+
:moderator,
|
|
29
|
+
Crystalline::Nilable.new(::String),
|
|
30
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("moderator")}}
|
|
31
|
+
)
|
|
32
|
+
# Record an allow or reject decision as a casebook case. Defaults to true when `moderator` is set, else false. Without `moderator`, the case is recorded as System.
|
|
33
|
+
field(
|
|
34
|
+
:create_casebook_case,
|
|
35
|
+
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
36
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("createCasebookCase")}}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
sig {
|
|
40
|
+
params(
|
|
41
|
+
reason: T.nilable(::String),
|
|
42
|
+
queue_id: T.nilable(::String),
|
|
43
|
+
moderator: T.nilable(::String),
|
|
44
|
+
create_casebook_case: T.nilable(T::Boolean)
|
|
45
|
+
)
|
|
46
|
+
.void
|
|
47
|
+
}
|
|
48
|
+
def initialize(reason: nil, queue_id: nil, moderator: nil, create_casebook_case: nil)
|
|
49
|
+
@reason = reason
|
|
50
|
+
@queue_id = queue_id
|
|
51
|
+
@moderator = moderator
|
|
52
|
+
@create_casebook_case = create_casebook_case
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
56
|
+
def ==(other)
|
|
57
|
+
return false unless other.is_a?(self.class)
|
|
58
|
+
return false unless @reason == other.reason
|
|
59
|
+
return false unless @queue_id == other.queue_id
|
|
60
|
+
return false unless @moderator == other.moderator
|
|
61
|
+
return false unless @create_casebook_case == other.create_casebook_case
|
|
62
|
+
true
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::RejectContentRequestBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::RejectContentRequestBody
|
|
9
|
+
def reason
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def reason=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def queue_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def queue_id=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def moderator
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def moderator=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def create_casebook_case
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def create_casebook_case=(str_)
|
|
31
|
+
end
|
|
32
|
+
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 RejectContentResponse
|
|
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
|
+
# Action executed successfully
|
|
21
|
+
field :object, Crystalline::Nilable.new(Models::Operations::RejectContentResponseBody)
|
|
22
|
+
|
|
23
|
+
sig {
|
|
24
|
+
params(
|
|
25
|
+
content_type: ::String,
|
|
26
|
+
status_code: ::Integer,
|
|
27
|
+
raw_response: ::Faraday::Response,
|
|
28
|
+
object: T.nilable(Models::Operations::RejectContentResponseBody)
|
|
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::RejectContentResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::RejectContentResponse
|
|
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
|
+
# Execution result
|
|
10
|
+
class RejectContentResponseBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Whether the action was executed successfully
|
|
15
|
+
field(
|
|
16
|
+
:success,
|
|
17
|
+
Crystalline::Boolean.new,
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("success"), required: true}}
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
sig { params(success: T::Boolean).void }
|
|
22
|
+
def initialize(success:)
|
|
23
|
+
@success = success
|
|
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 @success == other.success
|
|
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::RejectContentResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::RejectContentResponseBody
|
|
9
|
+
def success
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def success=(str_)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -13,7 +13,7 @@ module ModerationApi
|
|
|
13
13
|
|
|
14
14
|
# The queue ID.
|
|
15
15
|
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
-
# The item
|
|
16
|
+
# The item to resolve: the item `id` from `GET /queue/{id}/items`, or the `contentId` you sent to `POST /moderate` (webhooks send it as `item.id`). For a content ID, the newest submission with that content ID is used, as the queue shows it.
|
|
17
17
|
field :item_id, ::String, {'path_param': {'field_name': "itemId", 'style': "simple", 'explode': false}}
|
|
18
18
|
# The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.
|
|
19
19
|
field(
|
|
@@ -11,7 +11,7 @@ module ModerationApi
|
|
|
11
11
|
extend T::Sig
|
|
12
12
|
include Crystalline::MetadataFields
|
|
13
13
|
|
|
14
|
-
# The
|
|
14
|
+
# The items to resolve, up to 100. Each is the item `id` from `GET /queue/{id}/items`, or the `contentId` you sent to `POST /moderate` (webhooks send it as `item.id`). For a content ID, the newest submission with that content ID is used, as the queue shows it.
|
|
15
15
|
field(
|
|
16
16
|
:item_ids,
|
|
17
17
|
Crystalline::Array.new(::String),
|
|
@@ -17,7 +17,7 @@ module ModerationApi
|
|
|
17
17
|
::Integer,
|
|
18
18
|
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("resolved"), required: true}}
|
|
19
19
|
)
|
|
20
|
-
#
|
|
20
|
+
# IDs from `itemIds` that match no item or content ID in the project.
|
|
21
21
|
field(
|
|
22
22
|
:not_found_ids,
|
|
23
23
|
Crystalline::Array.new(::String),
|
|
@@ -0,0 +1,45 @@
|
|
|
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 SuspendAuthorRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Either external ID or the ID assigned by moderation API.
|
|
15
|
+
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
|
|
17
|
+
field :body, Models::Operations::SuspendAuthorRequestBody, {'request': {'media_type': "application/json"}}
|
|
18
|
+
# The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.
|
|
19
|
+
field(
|
|
20
|
+
:project_id,
|
|
21
|
+
Crystalline::Nilable.new(::String),
|
|
22
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
sig {
|
|
26
|
+
params(id: ::String, body: Models::Operations::SuspendAuthorRequestBody, project_id: T.nilable(::String)).void
|
|
27
|
+
}
|
|
28
|
+
def initialize(id:, body:, project_id: nil)
|
|
29
|
+
@id = id
|
|
30
|
+
@body = body
|
|
31
|
+
@project_id = project_id
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
35
|
+
def ==(other)
|
|
36
|
+
return false unless other.is_a?(self.class)
|
|
37
|
+
return false unless @id == other.id
|
|
38
|
+
return false unless @body == other.body
|
|
39
|
+
return false unless @project_id == other.project_id
|
|
40
|
+
true
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::SuspendAuthorRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::SuspendAuthorRequest
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def body
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def body=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def project_id
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def project_id=(str_)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
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 SuspendAuthorRequestBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Why the action was taken. Saved with the action and sent in the webhook event.
|
|
15
|
+
field(
|
|
16
|
+
:reason,
|
|
17
|
+
Crystalline::Nilable.new(::String),
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("reason")}}
|
|
19
|
+
)
|
|
20
|
+
# How long the suspension lasts, in milliseconds. Defaults to 24 hours.
|
|
21
|
+
field(
|
|
22
|
+
:duration,
|
|
23
|
+
Crystalline::Nilable.new(::Float),
|
|
24
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("duration")}}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
sig { params(reason: T.nilable(::String), duration: T.nilable(::Float)).void }
|
|
28
|
+
def initialize(reason: nil, duration: nil)
|
|
29
|
+
@reason = reason
|
|
30
|
+
@duration = duration
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
34
|
+
def ==(other)
|
|
35
|
+
return false unless other.is_a?(self.class)
|
|
36
|
+
return false unless @reason == other.reason
|
|
37
|
+
return false unless @duration == other.duration
|
|
38
|
+
true
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::SuspendAuthorRequestBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::SuspendAuthorRequestBody
|
|
9
|
+
def reason
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def reason=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def duration
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def duration=(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 SuspendAuthorResponse
|
|
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
|
+
# Action executed successfully
|
|
21
|
+
field :object, Crystalline::Nilable.new(Models::Operations::SuspendAuthorResponseBody)
|
|
22
|
+
|
|
23
|
+
sig {
|
|
24
|
+
params(
|
|
25
|
+
content_type: ::String,
|
|
26
|
+
status_code: ::Integer,
|
|
27
|
+
raw_response: ::Faraday::Response,
|
|
28
|
+
object: T.nilable(Models::Operations::SuspendAuthorResponseBody)
|
|
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::SuspendAuthorResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::SuspendAuthorResponse
|
|
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
|