moderation_api 3.0.0 → 3.1.1
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 +3 -3
- 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
|
@@ -11,147 +11,25 @@ module ModerationApi
|
|
|
11
11
|
extend T::Sig
|
|
12
12
|
include Crystalline::MetadataFields
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
field :body, Models::Operations::CreateActionRequestBody, {'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 IDs of the queues the action is available in.
|
|
21
|
-
field(
|
|
22
|
-
:filter_in_queue_ids,
|
|
23
|
-
Crystalline::Nilable.new(Crystalline::Array.new(::String)),
|
|
24
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("filterInQueueIds")}}
|
|
25
|
-
)
|
|
26
|
-
# The possible values of the action. The user will be prompted to select one of these values when executing the action.
|
|
27
|
-
field(
|
|
28
|
-
:possible_values,
|
|
29
|
-
Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::CreateActionPossibleValueRequest)),
|
|
30
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("possibleValues")}}
|
|
31
|
-
)
|
|
32
|
-
# User defined key of the action.
|
|
33
|
-
field(
|
|
34
|
-
:key,
|
|
17
|
+
:project_id,
|
|
35
18
|
Crystalline::Nilable.new(::String),
|
|
36
|
-
{'
|
|
37
|
-
)
|
|
38
|
-
# The description of the action.
|
|
39
|
-
field(
|
|
40
|
-
:description,
|
|
41
|
-
Crystalline::Nilable.new(::String),
|
|
42
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description")}}
|
|
43
|
-
)
|
|
44
|
-
# The type of the action.
|
|
45
|
-
field(
|
|
46
|
-
:type,
|
|
47
|
-
Crystalline::Nilable.new(Models::Operations::CreateActionTypeRequest),
|
|
48
|
-
{
|
|
49
|
-
'format_json': {
|
|
50
|
-
'letter_case': ::ModerationApi::Utils.field_name("type"),
|
|
51
|
-
'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::CreateActionTypeRequest, true)
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
# Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.
|
|
56
|
-
field(
|
|
57
|
-
:queue_behaviour,
|
|
58
|
-
Crystalline::Nilable.new(Models::Operations::CreateActionQueueBehaviourRequest),
|
|
59
|
-
{
|
|
60
|
-
'format_json': {
|
|
61
|
-
'letter_case': ::ModerationApi::Utils.field_name("queueBehaviour"),
|
|
62
|
-
'decoder': ::ModerationApi::Utils.enum_from_string(
|
|
63
|
-
Models::Operations::CreateActionQueueBehaviourRequest,
|
|
64
|
-
true
|
|
65
|
-
)
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
# Show the action in all queues, selected queues or no queues (to use via API only).
|
|
70
|
-
field(
|
|
71
|
-
:position,
|
|
72
|
-
Crystalline::Nilable.new(Models::Operations::CreateActionPositionRequest),
|
|
73
|
-
{
|
|
74
|
-
'format_json': {
|
|
75
|
-
'letter_case': ::ModerationApi::Utils.field_name("position"),
|
|
76
|
-
'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::CreateActionPositionRequest, true)
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
# Whether the action requires a value to be executed.
|
|
81
|
-
field(
|
|
82
|
-
:value_required,
|
|
83
|
-
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
84
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("valueRequired")}}
|
|
85
|
-
)
|
|
86
|
-
# Whether the action allows any text to be entered as a value or if it must be one of the possible values.
|
|
87
|
-
field(
|
|
88
|
-
:free_text,
|
|
89
|
-
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
90
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("freeText")}}
|
|
91
|
-
)
|
|
92
|
-
# Whether the action is a built-in action or a custom one.
|
|
93
|
-
field(
|
|
94
|
-
:built_in,
|
|
95
|
-
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
96
|
-
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("builtIn")}}
|
|
19
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
97
20
|
)
|
|
98
21
|
|
|
99
|
-
sig {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
possible_values: T.nilable(T::Array[Models::Operations::CreateActionPossibleValueRequest]),
|
|
104
|
-
key: T.nilable(::String),
|
|
105
|
-
description: T.nilable(::String),
|
|
106
|
-
type: T.nilable(Models::Operations::CreateActionTypeRequest),
|
|
107
|
-
queue_behaviour: T.nilable(Models::Operations::CreateActionQueueBehaviourRequest),
|
|
108
|
-
position: T.nilable(Models::Operations::CreateActionPositionRequest),
|
|
109
|
-
value_required: T.nilable(T::Boolean),
|
|
110
|
-
free_text: T.nilable(T::Boolean),
|
|
111
|
-
built_in: T.nilable(T::Boolean)
|
|
112
|
-
)
|
|
113
|
-
.void
|
|
114
|
-
}
|
|
115
|
-
def initialize(
|
|
116
|
-
name:,
|
|
117
|
-
filter_in_queue_ids: nil,
|
|
118
|
-
possible_values: nil,
|
|
119
|
-
key: nil,
|
|
120
|
-
description: nil,
|
|
121
|
-
type: nil,
|
|
122
|
-
queue_behaviour: Models::Operations::CreateActionQueueBehaviourRequest::NO_CHANGE,
|
|
123
|
-
position: Models::Operations::CreateActionPositionRequest::ALL_QUEUES,
|
|
124
|
-
value_required: false,
|
|
125
|
-
free_text: false,
|
|
126
|
-
built_in: false
|
|
127
|
-
)
|
|
128
|
-
@name = name
|
|
129
|
-
@filter_in_queue_ids = filter_in_queue_ids
|
|
130
|
-
@possible_values = possible_values
|
|
131
|
-
@key = key
|
|
132
|
-
@description = description
|
|
133
|
-
@type = type
|
|
134
|
-
@queue_behaviour = queue_behaviour
|
|
135
|
-
@position = position
|
|
136
|
-
@value_required = value_required
|
|
137
|
-
@free_text = free_text
|
|
138
|
-
@built_in = built_in
|
|
22
|
+
sig { params(body: Models::Operations::CreateActionRequestBody, project_id: T.nilable(::String)).void }
|
|
23
|
+
def initialize(body:, project_id: nil)
|
|
24
|
+
@body = body
|
|
25
|
+
@project_id = project_id
|
|
139
26
|
end
|
|
140
27
|
|
|
141
28
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
142
29
|
def ==(other)
|
|
143
30
|
return false unless other.is_a?(self.class)
|
|
144
|
-
return false unless @
|
|
145
|
-
return false unless @
|
|
146
|
-
return false unless @possible_values == other.possible_values
|
|
147
|
-
return false unless @key == other.key
|
|
148
|
-
return false unless @description == other.description
|
|
149
|
-
return false unless @type == other.type
|
|
150
|
-
return false unless @queue_behaviour == other.queue_behaviour
|
|
151
|
-
return false unless @position == other.position
|
|
152
|
-
return false unless @value_required == other.value_required
|
|
153
|
-
return false unless @free_text == other.free_text
|
|
154
|
-
return false unless @built_in == other.built_in
|
|
31
|
+
return false unless @body == other.body
|
|
32
|
+
return false unless @project_id == other.project_id
|
|
155
33
|
true
|
|
156
34
|
end
|
|
157
35
|
end
|
|
@@ -6,69 +6,15 @@ class ModerationApi::Models::Operations::CreateActionRequest
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
class ModerationApi::Models::Operations::CreateActionRequest
|
|
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 possible_values
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def possible_values=(str_)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def key
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def key=(str_)
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def description
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def description=(str_)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def type
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def type=(str_)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def queue_behaviour
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def queue_behaviour=(str_)
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
def position
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def position=(str_)
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
def value_required
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
def value_required=(str_)
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
def free_text
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
def free_text=(str_)
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def built_in
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
def built_in=(str_)
|
|
18
|
+
def project_id=(str_)
|
|
73
19
|
end
|
|
74
20
|
end
|
|
@@ -0,0 +1,160 @@
|
|
|
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 CreateActionRequestBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The name of the action.
|
|
15
|
+
field(
|
|
16
|
+
:name,
|
|
17
|
+
::String,
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}}
|
|
19
|
+
)
|
|
20
|
+
# The IDs of the queues the action is available in.
|
|
21
|
+
field(
|
|
22
|
+
:filter_in_queue_ids,
|
|
23
|
+
Crystalline::Nilable.new(Crystalline::Array.new(::String)),
|
|
24
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("filterInQueueIds")}}
|
|
25
|
+
)
|
|
26
|
+
# The possible values of the action. The user will be prompted to select one of these values when executing the action.
|
|
27
|
+
field(
|
|
28
|
+
:possible_values,
|
|
29
|
+
Crystalline::Nilable.new(Crystalline::Array.new(Models::Operations::CreateActionPossibleValueRequest)),
|
|
30
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("possibleValues")}}
|
|
31
|
+
)
|
|
32
|
+
# User defined key of the action.
|
|
33
|
+
field(
|
|
34
|
+
:key,
|
|
35
|
+
Crystalline::Nilable.new(::String),
|
|
36
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("key")}}
|
|
37
|
+
)
|
|
38
|
+
# The description of the action.
|
|
39
|
+
field(
|
|
40
|
+
:description,
|
|
41
|
+
Crystalline::Nilable.new(::String),
|
|
42
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description")}}
|
|
43
|
+
)
|
|
44
|
+
# The type of the action.
|
|
45
|
+
field(
|
|
46
|
+
:type,
|
|
47
|
+
Crystalline::Nilable.new(Models::Operations::CreateActionTypeRequest),
|
|
48
|
+
{
|
|
49
|
+
'format_json': {
|
|
50
|
+
'letter_case': ::ModerationApi::Utils.field_name("type"),
|
|
51
|
+
'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::CreateActionTypeRequest, true)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
# Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status.
|
|
56
|
+
field(
|
|
57
|
+
:queue_behaviour,
|
|
58
|
+
Crystalline::Nilable.new(Models::Operations::CreateActionQueueBehaviourRequest),
|
|
59
|
+
{
|
|
60
|
+
'format_json': {
|
|
61
|
+
'letter_case': ::ModerationApi::Utils.field_name("queueBehaviour"),
|
|
62
|
+
'decoder': ::ModerationApi::Utils.enum_from_string(
|
|
63
|
+
Models::Operations::CreateActionQueueBehaviourRequest,
|
|
64
|
+
true
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
# Show the action in all queues, selected queues or no queues (to use via API only).
|
|
70
|
+
field(
|
|
71
|
+
:position,
|
|
72
|
+
Crystalline::Nilable.new(Models::Operations::CreateActionPositionRequest),
|
|
73
|
+
{
|
|
74
|
+
'format_json': {
|
|
75
|
+
'letter_case': ::ModerationApi::Utils.field_name("position"),
|
|
76
|
+
'decoder': ::ModerationApi::Utils.enum_from_string(Models::Operations::CreateActionPositionRequest, true)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
# Whether the action requires a value to be executed.
|
|
81
|
+
field(
|
|
82
|
+
:value_required,
|
|
83
|
+
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
84
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("valueRequired")}}
|
|
85
|
+
)
|
|
86
|
+
# Whether the action allows any text to be entered as a value or if it must be one of the possible values.
|
|
87
|
+
field(
|
|
88
|
+
:free_text,
|
|
89
|
+
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
90
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("freeText")}}
|
|
91
|
+
)
|
|
92
|
+
# Whether the action is a built-in action or a custom one.
|
|
93
|
+
field(
|
|
94
|
+
:built_in,
|
|
95
|
+
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
96
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("builtIn")}}
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
sig {
|
|
100
|
+
params(
|
|
101
|
+
name: ::String,
|
|
102
|
+
filter_in_queue_ids: T.nilable(T::Array[::String]),
|
|
103
|
+
possible_values: T.nilable(T::Array[Models::Operations::CreateActionPossibleValueRequest]),
|
|
104
|
+
key: T.nilable(::String),
|
|
105
|
+
description: T.nilable(::String),
|
|
106
|
+
type: T.nilable(Models::Operations::CreateActionTypeRequest),
|
|
107
|
+
queue_behaviour: T.nilable(Models::Operations::CreateActionQueueBehaviourRequest),
|
|
108
|
+
position: T.nilable(Models::Operations::CreateActionPositionRequest),
|
|
109
|
+
value_required: T.nilable(T::Boolean),
|
|
110
|
+
free_text: T.nilable(T::Boolean),
|
|
111
|
+
built_in: T.nilable(T::Boolean)
|
|
112
|
+
)
|
|
113
|
+
.void
|
|
114
|
+
}
|
|
115
|
+
def initialize(
|
|
116
|
+
name:,
|
|
117
|
+
filter_in_queue_ids: nil,
|
|
118
|
+
possible_values: nil,
|
|
119
|
+
key: nil,
|
|
120
|
+
description: nil,
|
|
121
|
+
type: nil,
|
|
122
|
+
queue_behaviour: Models::Operations::CreateActionQueueBehaviourRequest::NO_CHANGE,
|
|
123
|
+
position: Models::Operations::CreateActionPositionRequest::ALL_QUEUES,
|
|
124
|
+
value_required: false,
|
|
125
|
+
free_text: false,
|
|
126
|
+
built_in: false
|
|
127
|
+
)
|
|
128
|
+
@name = name
|
|
129
|
+
@filter_in_queue_ids = filter_in_queue_ids
|
|
130
|
+
@possible_values = possible_values
|
|
131
|
+
@key = key
|
|
132
|
+
@description = description
|
|
133
|
+
@type = type
|
|
134
|
+
@queue_behaviour = queue_behaviour
|
|
135
|
+
@position = position
|
|
136
|
+
@value_required = value_required
|
|
137
|
+
@free_text = free_text
|
|
138
|
+
@built_in = built_in
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
142
|
+
def ==(other)
|
|
143
|
+
return false unless other.is_a?(self.class)
|
|
144
|
+
return false unless @name == other.name
|
|
145
|
+
return false unless @filter_in_queue_ids == other.filter_in_queue_ids
|
|
146
|
+
return false unless @possible_values == other.possible_values
|
|
147
|
+
return false unless @key == other.key
|
|
148
|
+
return false unless @description == other.description
|
|
149
|
+
return false unless @type == other.type
|
|
150
|
+
return false unless @queue_behaviour == other.queue_behaviour
|
|
151
|
+
return false unless @position == other.position
|
|
152
|
+
return false unless @value_required == other.value_required
|
|
153
|
+
return false unless @free_text == other.free_text
|
|
154
|
+
return false unless @built_in == other.built_in
|
|
155
|
+
true
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::CreateActionRequestBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateActionRequestBody
|
|
9
|
+
def name
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def name=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def filter_in_queue_ids
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def filter_in_queue_ids=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def possible_values
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def possible_values=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def key
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def key=(str_)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def description
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def description=(str_)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def type
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def type=(str_)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def queue_behaviour
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def queue_behaviour=(str_)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def position
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def position=(str_)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def value_required
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def value_required=(str_)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def free_text
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def free_text=(str_)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def built_in
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def built_in=(str_)
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -11,119 +11,25 @@ module ModerationApi
|
|
|
11
11
|
extend T::Sig
|
|
12
12
|
include Crystalline::MetadataFields
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
field :body, Models::Operations::CreateAuthorRequestBody, {'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("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,
|
|
17
|
+
:project_id,
|
|
65
18
|
Crystalline::Nilable.new(::String),
|
|
66
|
-
{'
|
|
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")}}
|
|
19
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
73
20
|
)
|
|
74
21
|
|
|
75
|
-
sig {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
|
22
|
+
sig { params(body: Models::Operations::CreateAuthorRequestBody, project_id: T.nilable(::String)).void }
|
|
23
|
+
def initialize(body:, project_id: nil)
|
|
24
|
+
@body = body
|
|
25
|
+
@project_id = project_id
|
|
112
26
|
end
|
|
113
27
|
|
|
114
28
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
115
29
|
def ==(other)
|
|
116
30
|
return false unless other.is_a?(self.class)
|
|
117
|
-
return false unless @
|
|
118
|
-
return false unless @
|
|
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
|
|
31
|
+
return false unless @body == other.body
|
|
32
|
+
return false unless @project_id == other.project_id
|
|
127
33
|
true
|
|
128
34
|
end
|
|
129
35
|
end
|
|
@@ -6,63 +6,15 @@ class ModerationApi::Models::Operations::CreateAuthorRequest
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
class ModerationApi::Models::Operations::CreateAuthorRequest
|
|
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 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_)
|
|
18
|
+
def project_id=(str_)
|
|
67
19
|
end
|
|
68
20
|
end
|