moderation_api 3.0.0 → 3.1.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/account.rb +10 -4
- data/lib/moderation_api/actions.rb +39 -20
- data/lib/moderation_api/authors.rb +27 -15
- data/lib/moderation_api/content.rb +10 -5
- data/lib/moderation_api/items.rb +13 -8
- data/lib/moderation_api/models/components/badrequesterror_code.rb +2 -0
- data/lib/moderation_api/models/components/permissiondeniederror_code.rb +0 -2
- data/lib/moderation_api/models/errors/badrequesterror.rb +1 -0
- data/lib/moderation_api/models/errors/permissiondeniederror.rb +0 -1
- data/lib/moderation_api/models/operations/addwordlistwords_request.rb +13 -2
- data/lib/moderation_api/models/operations/addwordlistwords_request.rbi +6 -0
- data/lib/moderation_api/models/operations/createaction_request.rb +10 -132
- data/lib/moderation_api/models/operations/createaction_request.rbi +4 -58
- data/lib/moderation_api/models/operations/createaction_requestbody.rb +160 -0
- data/lib/moderation_api/models/operations/createaction_requestbody.rbi +74 -0
- data/lib/moderation_api/models/operations/createauthor_request.rb +10 -104
- data/lib/moderation_api/models/operations/createauthor_request.rbi +4 -52
- data/lib/moderation_api/models/operations/createauthor_requestbody.rb +132 -0
- data/lib/moderation_api/models/operations/createauthor_requestbody.rbi +68 -0
- data/lib/moderation_api/models/operations/createwebhook_request.rb +10 -35
- data/lib/moderation_api/models/operations/createwebhook_request.rbi +4 -16
- data/lib/moderation_api/models/operations/createwebhook_requestbody.rb +63 -0
- data/lib/moderation_api/models/operations/createwebhook_requestbody.rbi +32 -0
- data/lib/moderation_api/models/operations/deleteaction_request.rb +10 -2
- data/lib/moderation_api/models/operations/deleteaction_request.rbi +6 -0
- data/lib/moderation_api/models/operations/deleteauthor_request.rb +10 -2
- data/lib/moderation_api/models/operations/deleteauthor_request.rbi +6 -0
- data/lib/moderation_api/models/operations/deletewebhook_request.rb +10 -2
- data/lib/moderation_api/models/operations/deletewebhook_request.rbi +6 -0
- data/lib/moderation_api/models/operations/executeaction_request.rb +11 -58
- data/lib/moderation_api/models/operations/executeaction_request.rbi +4 -28
- data/lib/moderation_api/models/operations/executeaction_requestbody.rb +85 -0
- data/lib/moderation_api/models/operations/executeaction_requestbody.rbi +44 -0
- data/lib/moderation_api/models/operations/getaccount_request.rb +35 -0
- data/lib/moderation_api/models/operations/getaccount_request.rbi +14 -0
- data/lib/moderation_api/models/operations/getaction_request.rb +10 -2
- data/lib/moderation_api/models/operations/getaction_request.rbi +6 -0
- data/lib/moderation_api/models/operations/getauthor_request.rb +10 -2
- data/lib/moderation_api/models/operations/getauthor_request.rbi +6 -0
- data/lib/moderation_api/models/operations/getqueue_request.rb +10 -2
- data/lib/moderation_api/models/operations/getqueue_request.rbi +6 -0
- data/lib/moderation_api/models/operations/getqueuestats_request.rb +10 -2
- data/lib/moderation_api/models/operations/getqueuestats_request.rbi +6 -0
- data/lib/moderation_api/models/operations/getwebhook_request.rb +10 -2
- data/lib/moderation_api/models/operations/getwebhook_request.rbi +6 -0
- data/lib/moderation_api/models/operations/getwebhooksecret_request.rb +35 -0
- data/lib/moderation_api/models/operations/getwebhooksecret_request.rbi +14 -0
- data/lib/moderation_api/models/operations/getwordlist_request.rb +10 -2
- data/lib/moderation_api/models/operations/getwordlist_request.rbi +6 -0
- data/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rb +10 -2
- data/lib/moderation_api/models/operations/getwordlistembeddingstatus_request.rbi +6 -0
- data/lib/moderation_api/models/operations/listactions_request.rb +18 -2
- data/lib/moderation_api/models/operations/listactions_request.rbi +6 -0
- data/lib/moderation_api/models/operations/listauthors_request.rb +10 -0
- data/lib/moderation_api/models/operations/listauthors_request.rbi +6 -0
- data/lib/moderation_api/models/operations/listqueueitems_request.rb +10 -0
- data/lib/moderation_api/models/operations/listqueueitems_request.rbi +6 -0
- data/lib/moderation_api/models/operations/listwebhooks_request.rb +13 -2
- data/lib/moderation_api/models/operations/listwebhooks_request.rbi +6 -0
- data/lib/moderation_api/models/operations/listwordlists_request.rb +13 -2
- data/lib/moderation_api/models/operations/listwordlists_request.rbi +6 -0
- data/lib/moderation_api/models/operations/removewordlistwords_request.rb +10 -2
- data/lib/moderation_api/models/operations/removewordlistwords_request.rbi +6 -0
- data/lib/moderation_api/models/operations/resolvequeueitem_request.rb +18 -2
- data/lib/moderation_api/models/operations/resolvequeueitem_request.rbi +6 -0
- data/lib/moderation_api/models/operations/submitcontent_request.rb +10 -231
- data/lib/moderation_api/models/operations/submitcontent_request.rbi +4 -58
- data/lib/moderation_api/models/operations/submitcontent_requestbody.rb +259 -0
- data/lib/moderation_api/models/operations/submitcontent_requestbody.rbi +74 -0
- data/lib/moderation_api/models/operations/unresolvequeueitem_request.rb +18 -2
- data/lib/moderation_api/models/operations/unresolvequeueitem_request.rbi +6 -0
- data/lib/moderation_api/models/operations/updateaction_request.rb +12 -2
- data/lib/moderation_api/models/operations/updateaction_request.rbi +6 -0
- data/lib/moderation_api/models/operations/updateauthor_request.rb +12 -2
- data/lib/moderation_api/models/operations/updateauthor_request.rbi +6 -0
- data/lib/moderation_api/models/operations/updatewebhook_request.rb +12 -2
- data/lib/moderation_api/models/operations/updatewebhook_request.rbi +6 -0
- data/lib/moderation_api/models/operations/updatewordlist_request.rb +13 -2
- data/lib/moderation_api/models/operations/updatewordlist_request.rbi +6 -0
- data/lib/moderation_api/models/operations.rb +7 -0
- data/lib/moderation_api/queue.rb +10 -6
- data/lib/moderation_api/sdkconfiguration.rb +2 -2
- data/lib/moderation_api/webhooks.rb +30 -16
- data/lib/moderation_api/webhooksecret.rb +10 -4
- data/lib/moderation_api/wordlist.rb +21 -12
- data/lib/moderation_api/words.rb +10 -6
- metadata +15 -1
|
@@ -0,0 +1,132 @@
|
|
|
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 CreateAuthorRequestBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# External ID of the user, typically the ID of the author in your database.
|
|
15
|
+
field(
|
|
16
|
+
:external_id,
|
|
17
|
+
::String,
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("external_id"), required: true}}
|
|
19
|
+
)
|
|
20
|
+
# Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process.
|
|
21
|
+
field(
|
|
22
|
+
:metadata,
|
|
23
|
+
Crystalline::Nilable.new(Models::Operations::CreateAuthorMetadata),
|
|
24
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("metadata")}}
|
|
25
|
+
)
|
|
26
|
+
# Timestamp when author first appeared
|
|
27
|
+
field(
|
|
28
|
+
:first_seen,
|
|
29
|
+
Crystalline::Nilable.new(::Float),
|
|
30
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("first_seen")}}
|
|
31
|
+
)
|
|
32
|
+
# Timestamp of last activity
|
|
33
|
+
field(
|
|
34
|
+
:last_seen,
|
|
35
|
+
Crystalline::Nilable.new(::Float),
|
|
36
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("last_seen")}}
|
|
37
|
+
)
|
|
38
|
+
# URL of the author's profile picture
|
|
39
|
+
field(
|
|
40
|
+
:profile_picture,
|
|
41
|
+
Crystalline::Nilable.new(::String),
|
|
42
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("profile_picture")}}
|
|
43
|
+
)
|
|
44
|
+
# URL of the author's external profile
|
|
45
|
+
field(
|
|
46
|
+
:external_link,
|
|
47
|
+
Crystalline::Nilable.new(::String),
|
|
48
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("external_link")}}
|
|
49
|
+
)
|
|
50
|
+
# Author name or identifier
|
|
51
|
+
field(
|
|
52
|
+
:name,
|
|
53
|
+
Crystalline::Nilable.new(::String),
|
|
54
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name")}}
|
|
55
|
+
)
|
|
56
|
+
# Author email address
|
|
57
|
+
field(
|
|
58
|
+
:email,
|
|
59
|
+
Crystalline::Nilable.new(::String),
|
|
60
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("email")}}
|
|
61
|
+
)
|
|
62
|
+
# The author's company or organization
|
|
63
|
+
field(
|
|
64
|
+
:company,
|
|
65
|
+
Crystalline::Nilable.new(::String),
|
|
66
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("company")}}
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
field(
|
|
70
|
+
:manual_trust_level,
|
|
71
|
+
Crystalline::Nilable.new(::Float),
|
|
72
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("manual_trust_level")}}
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
sig {
|
|
76
|
+
params(
|
|
77
|
+
external_id: ::String,
|
|
78
|
+
metadata: T.nilable(Models::Operations::CreateAuthorMetadata),
|
|
79
|
+
first_seen: T.nilable(::Float),
|
|
80
|
+
last_seen: T.nilable(::Float),
|
|
81
|
+
profile_picture: T.nilable(::String),
|
|
82
|
+
external_link: T.nilable(::String),
|
|
83
|
+
name: T.nilable(::String),
|
|
84
|
+
email: T.nilable(::String),
|
|
85
|
+
company: T.nilable(::String),
|
|
86
|
+
manual_trust_level: T.nilable(::Float)
|
|
87
|
+
)
|
|
88
|
+
.void
|
|
89
|
+
}
|
|
90
|
+
def initialize(
|
|
91
|
+
external_id:,
|
|
92
|
+
metadata: nil,
|
|
93
|
+
first_seen: nil,
|
|
94
|
+
last_seen: nil,
|
|
95
|
+
profile_picture: nil,
|
|
96
|
+
external_link: nil,
|
|
97
|
+
name: nil,
|
|
98
|
+
email: nil,
|
|
99
|
+
company: nil,
|
|
100
|
+
manual_trust_level: nil
|
|
101
|
+
)
|
|
102
|
+
@external_id = external_id
|
|
103
|
+
@metadata = metadata
|
|
104
|
+
@first_seen = first_seen
|
|
105
|
+
@last_seen = last_seen
|
|
106
|
+
@profile_picture = profile_picture
|
|
107
|
+
@external_link = external_link
|
|
108
|
+
@name = name
|
|
109
|
+
@email = email
|
|
110
|
+
@company = company
|
|
111
|
+
@manual_trust_level = manual_trust_level
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
115
|
+
def ==(other)
|
|
116
|
+
return false unless other.is_a?(self.class)
|
|
117
|
+
return false unless @external_id == other.external_id
|
|
118
|
+
return false unless @metadata == other.metadata
|
|
119
|
+
return false unless @first_seen == other.first_seen
|
|
120
|
+
return false unless @last_seen == other.last_seen
|
|
121
|
+
return false unless @profile_picture == other.profile_picture
|
|
122
|
+
return false unless @external_link == other.external_link
|
|
123
|
+
return false unless @name == other.name
|
|
124
|
+
return false unless @email == other.email
|
|
125
|
+
return false unless @company == other.company
|
|
126
|
+
return false unless @manual_trust_level == other.manual_trust_level
|
|
127
|
+
true
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::CreateAuthorRequestBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateAuthorRequestBody
|
|
9
|
+
def external_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def external_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def metadata
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def metadata=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def first_seen
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def first_seen=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def last_seen
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def last_seen=(str_)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def profile_picture
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def profile_picture=(str_)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def external_link
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def external_link=(str_)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def name
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def name=(str_)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def email
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def email=(str_)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def company
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def company=(str_)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def manual_trust_level
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def manual_trust_level=(str_)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -11,50 +11,25 @@ module ModerationApi
|
|
|
11
11
|
extend T::Sig
|
|
12
12
|
include Crystalline::MetadataFields
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
field :body, Models::Operations::CreateWebhookRequestBody, {'request': {'media_type': "application/json"}}
|
|
15
|
+
# The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.
|
|
15
16
|
field(
|
|
16
|
-
:
|
|
17
|
-
::String,
|
|
18
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}}
|
|
19
|
-
)
|
|
20
|
-
# The webhook's URL. We'll call this URL when an event occurs.
|
|
21
|
-
field :url, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("url"), required: true}}
|
|
22
|
-
# Event types this webhook subscribes to. One webhook URL receives all events you list here.
|
|
23
|
-
field(
|
|
24
|
-
:event_types,
|
|
25
|
-
Crystalline::Array.new(Models::Operations::CreateWebhookEventTypeRequest),
|
|
26
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("eventTypes"), required: true}}
|
|
27
|
-
)
|
|
28
|
-
# The webhook's description
|
|
29
|
-
field(
|
|
30
|
-
:description,
|
|
17
|
+
:project_id,
|
|
31
18
|
Crystalline::Nilable.new(::String),
|
|
32
|
-
{'
|
|
19
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
33
20
|
)
|
|
34
21
|
|
|
35
|
-
sig {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
event_types: T::Array[Models::Operations::CreateWebhookEventTypeRequest],
|
|
40
|
-
description: T.nilable(::String)
|
|
41
|
-
)
|
|
42
|
-
.void
|
|
43
|
-
}
|
|
44
|
-
def initialize(name:, url:, event_types:, description: nil)
|
|
45
|
-
@name = name
|
|
46
|
-
@url = url
|
|
47
|
-
@event_types = event_types
|
|
48
|
-
@description = description
|
|
22
|
+
sig { params(body: Models::Operations::CreateWebhookRequestBody, project_id: T.nilable(::String)).void }
|
|
23
|
+
def initialize(body:, project_id: nil)
|
|
24
|
+
@body = body
|
|
25
|
+
@project_id = project_id
|
|
49
26
|
end
|
|
50
27
|
|
|
51
28
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
52
29
|
def ==(other)
|
|
53
30
|
return false unless other.is_a?(self.class)
|
|
54
|
-
return false unless @
|
|
55
|
-
return false unless @
|
|
56
|
-
return false unless @event_types == other.event_types
|
|
57
|
-
return false unless @description == other.description
|
|
31
|
+
return false unless @body == other.body
|
|
32
|
+
return false unless @project_id == other.project_id
|
|
58
33
|
true
|
|
59
34
|
end
|
|
60
35
|
end
|
|
@@ -6,27 +6,15 @@ class ModerationApi::Models::Operations::CreateWebhookRequest
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
class ModerationApi::Models::Operations::CreateWebhookRequest
|
|
9
|
-
def
|
|
9
|
+
def body
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
def
|
|
12
|
+
def body=(str_)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def
|
|
15
|
+
def project_id
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def event_types
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def event_types=(str_)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def description
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def description=(str_)
|
|
18
|
+
def project_id=(str_)
|
|
31
19
|
end
|
|
32
20
|
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 CreateWebhookRequestBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The webhook's name, used to identify it in the dashboard
|
|
15
|
+
field(
|
|
16
|
+
:name,
|
|
17
|
+
::String,
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}}
|
|
19
|
+
)
|
|
20
|
+
# The webhook's URL. We'll call this URL when an event occurs.
|
|
21
|
+
field :url, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("url"), required: true}}
|
|
22
|
+
# Event types this webhook subscribes to. One webhook URL receives all events you list here.
|
|
23
|
+
field(
|
|
24
|
+
:event_types,
|
|
25
|
+
Crystalline::Array.new(Models::Operations::CreateWebhookEventTypeRequest),
|
|
26
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("eventTypes"), required: true}}
|
|
27
|
+
)
|
|
28
|
+
# The webhook's description
|
|
29
|
+
field(
|
|
30
|
+
:description,
|
|
31
|
+
Crystalline::Nilable.new(::String),
|
|
32
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description")}}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
sig {
|
|
36
|
+
params(
|
|
37
|
+
name: ::String,
|
|
38
|
+
url: ::String,
|
|
39
|
+
event_types: T::Array[Models::Operations::CreateWebhookEventTypeRequest],
|
|
40
|
+
description: T.nilable(::String)
|
|
41
|
+
)
|
|
42
|
+
.void
|
|
43
|
+
}
|
|
44
|
+
def initialize(name:, url:, event_types:, description: nil)
|
|
45
|
+
@name = name
|
|
46
|
+
@url = url
|
|
47
|
+
@event_types = event_types
|
|
48
|
+
@description = description
|
|
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 @name == other.name
|
|
55
|
+
return false unless @url == other.url
|
|
56
|
+
return false unless @event_types == other.event_types
|
|
57
|
+
return false unless @description == other.description
|
|
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::CreateWebhookRequestBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateWebhookRequestBody
|
|
9
|
+
def name
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def name=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def url
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def url=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def event_types
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def event_types=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def description
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def description=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -13,16 +13,24 @@ module ModerationApi
|
|
|
13
13
|
|
|
14
14
|
# The ID of the action to delete.
|
|
15
15
|
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
# The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: 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
|
+
)
|
|
16
22
|
|
|
17
|
-
sig { params(id: ::String).void }
|
|
18
|
-
def initialize(id:)
|
|
23
|
+
sig { params(id: ::String, project_id: T.nilable(::String)).void }
|
|
24
|
+
def initialize(id:, project_id: nil)
|
|
19
25
|
@id = id
|
|
26
|
+
@project_id = project_id
|
|
20
27
|
end
|
|
21
28
|
|
|
22
29
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
23
30
|
def ==(other)
|
|
24
31
|
return false unless other.is_a?(self.class)
|
|
25
32
|
return false unless @id == other.id
|
|
33
|
+
return false unless @project_id == other.project_id
|
|
26
34
|
true
|
|
27
35
|
end
|
|
28
36
|
end
|
|
@@ -13,16 +13,24 @@ module ModerationApi
|
|
|
13
13
|
|
|
14
14
|
# Either external ID or the ID assigned by moderation API.
|
|
15
15
|
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
# The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: 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
|
+
)
|
|
16
22
|
|
|
17
|
-
sig { params(id: ::String).void }
|
|
18
|
-
def initialize(id:)
|
|
23
|
+
sig { params(id: ::String, project_id: T.nilable(::String)).void }
|
|
24
|
+
def initialize(id:, project_id: nil)
|
|
19
25
|
@id = id
|
|
26
|
+
@project_id = project_id
|
|
20
27
|
end
|
|
21
28
|
|
|
22
29
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
23
30
|
def ==(other)
|
|
24
31
|
return false unless other.is_a?(self.class)
|
|
25
32
|
return false unless @id == other.id
|
|
33
|
+
return false unless @project_id == other.project_id
|
|
26
34
|
true
|
|
27
35
|
end
|
|
28
36
|
end
|
|
@@ -13,16 +13,24 @@ module ModerationApi
|
|
|
13
13
|
|
|
14
14
|
# The ID of the webhook to delete.
|
|
15
15
|
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
# The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: 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
|
+
)
|
|
16
22
|
|
|
17
|
-
sig { params(id: ::String).void }
|
|
18
|
-
def initialize(id:)
|
|
23
|
+
sig { params(id: ::String, project_id: T.nilable(::String)).void }
|
|
24
|
+
def initialize(id:, project_id: nil)
|
|
19
25
|
@id = id
|
|
26
|
+
@project_id = project_id
|
|
20
27
|
end
|
|
21
28
|
|
|
22
29
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
23
30
|
def ==(other)
|
|
24
31
|
return false unless other.is_a?(self.class)
|
|
25
32
|
return false unless @id == other.id
|
|
33
|
+
return false unless @project_id == other.project_id
|
|
26
34
|
true
|
|
27
35
|
end
|
|
28
36
|
end
|
|
@@ -6,77 +6,30 @@
|
|
|
6
6
|
module ModerationApi
|
|
7
7
|
module Models
|
|
8
8
|
module Operations
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
class ExecuteActionRequest
|
|
11
11
|
extend T::Sig
|
|
12
12
|
include Crystalline::MetadataFields
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:action_key,
|
|
17
|
-
::String,
|
|
18
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("actionKey"), required: true}}
|
|
19
|
-
)
|
|
20
|
-
# IDs of the content items to apply the action to. Provide this or authorIds.
|
|
21
|
-
field(
|
|
22
|
-
:content_ids,
|
|
23
|
-
Crystalline::Nilable.new(Crystalline::Array.new(::String)),
|
|
24
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("contentIds")}}
|
|
25
|
-
)
|
|
26
|
-
# IDs of the authors to apply the action to. Provide this or contentIds.
|
|
27
|
-
field(
|
|
28
|
-
:author_ids,
|
|
29
|
-
Crystalline::Nilable.new(Crystalline::Array.new(::String)),
|
|
30
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("authorIds")}}
|
|
31
|
-
)
|
|
32
|
-
# Optional value to provide with the action
|
|
33
|
-
field(
|
|
34
|
-
:value,
|
|
35
|
-
Crystalline::Nilable.new(::String),
|
|
36
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("value")}}
|
|
37
|
-
)
|
|
38
|
-
# Optional queue ID if the action is queue-specific
|
|
14
|
+
field :body, Models::Operations::ExecuteActionRequestBody, {'request': {'media_type': "application/json"}}
|
|
15
|
+
# The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error.
|
|
39
16
|
field(
|
|
40
|
-
:
|
|
17
|
+
:project_id,
|
|
41
18
|
Crystalline::Nilable.new(::String),
|
|
42
|
-
{'
|
|
43
|
-
)
|
|
44
|
-
# Optional duration in milliseconds for actions with timeouts
|
|
45
|
-
field(
|
|
46
|
-
:duration,
|
|
47
|
-
Crystalline::Nilable.new(::Float),
|
|
48
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("duration")}}
|
|
19
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
49
20
|
)
|
|
50
21
|
|
|
51
|
-
sig {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
author_ids: T.nilable(T::Array[::String]),
|
|
56
|
-
value: T.nilable(::String),
|
|
57
|
-
queue_id: T.nilable(::String),
|
|
58
|
-
duration: T.nilable(::Float)
|
|
59
|
-
)
|
|
60
|
-
.void
|
|
61
|
-
}
|
|
62
|
-
def initialize(action_key:, content_ids: nil, author_ids: nil, value: nil, queue_id: nil, duration: nil)
|
|
63
|
-
@action_key = action_key
|
|
64
|
-
@content_ids = content_ids
|
|
65
|
-
@author_ids = author_ids
|
|
66
|
-
@value = value
|
|
67
|
-
@queue_id = queue_id
|
|
68
|
-
@duration = duration
|
|
22
|
+
sig { params(body: Models::Operations::ExecuteActionRequestBody, project_id: T.nilable(::String)).void }
|
|
23
|
+
def initialize(body:, project_id: nil)
|
|
24
|
+
@body = body
|
|
25
|
+
@project_id = project_id
|
|
69
26
|
end
|
|
70
27
|
|
|
71
28
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
72
29
|
def ==(other)
|
|
73
30
|
return false unless other.is_a?(self.class)
|
|
74
|
-
return false unless @
|
|
75
|
-
return false unless @
|
|
76
|
-
return false unless @author_ids == other.author_ids
|
|
77
|
-
return false unless @value == other.value
|
|
78
|
-
return false unless @queue_id == other.queue_id
|
|
79
|
-
return false unless @duration == other.duration
|
|
31
|
+
return false unless @body == other.body
|
|
32
|
+
return false unless @project_id == other.project_id
|
|
80
33
|
true
|
|
81
34
|
end
|
|
82
35
|
end
|
|
@@ -6,39 +6,15 @@ class ModerationApi::Models::Operations::ExecuteActionRequest
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
class ModerationApi::Models::Operations::ExecuteActionRequest
|
|
9
|
-
def
|
|
9
|
+
def body
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
def
|
|
12
|
+
def body=(str_)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def
|
|
15
|
+
def project_id
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def author_ids
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def author_ids=(str_)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def value
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def value=(str_)
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def queue_id
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def queue_id=(str_)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def duration
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def duration=(str_)
|
|
18
|
+
def project_id=(str_)
|
|
43
19
|
end
|
|
44
20
|
end
|