moderation_api 3.2.0 → 3.3.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/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/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/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.rb +20 -0
- data/lib/moderation_api/moderationapi.rb +2 -2
- data/lib/moderation_api/sdkconfiguration.rb +2 -2
- data/lib/moderation_api.rb +1 -1
- metadata +42 -2
|
@@ -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
|
|
@@ -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
|
|
@@ -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 SuspendAuthorResponseBody
|
|
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::SuspendAuthorResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::SuspendAuthorResponseBody
|
|
9
|
+
def success
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def success=(str_)
|
|
13
|
+
end
|
|
14
|
+
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 UnblockAuthorRequest
|
|
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::UnblockAuthorRequestBody, {'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::UnblockAuthorRequestBody, 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::UnblockAuthorRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::UnblockAuthorRequest
|
|
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,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
|
+
|
|
10
|
+
class UnblockAuthorRequestBody
|
|
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
|
+
|
|
21
|
+
sig { params(reason: T.nilable(::String)).void }
|
|
22
|
+
def initialize(reason: nil)
|
|
23
|
+
@reason = reason
|
|
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 @reason == other.reason
|
|
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::UnblockAuthorRequestBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::UnblockAuthorRequestBody
|
|
9
|
+
def reason
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def reason=(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 UnblockAuthorResponse
|
|
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::UnblockAuthorResponseBody)
|
|
22
|
+
|
|
23
|
+
sig {
|
|
24
|
+
params(
|
|
25
|
+
content_type: ::String,
|
|
26
|
+
status_code: ::Integer,
|
|
27
|
+
raw_response: ::Faraday::Response,
|
|
28
|
+
object: T.nilable(Models::Operations::UnblockAuthorResponseBody)
|
|
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::UnblockAuthorResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::UnblockAuthorResponse
|
|
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 UnblockAuthorResponseBody
|
|
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::UnblockAuthorResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::UnblockAuthorResponseBody
|
|
9
|
+
def success
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def success=(str_)
|
|
13
|
+
end
|
|
14
|
+
end
|