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
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
# Input parameters
|
|
10
|
+
class ExecuteActionRequestBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# ID or key of the action to execute
|
|
15
|
+
field(
|
|
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
|
|
39
|
+
field(
|
|
40
|
+
:queue_id,
|
|
41
|
+
Crystalline::Nilable.new(::String),
|
|
42
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("queueId")}}
|
|
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")}}
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
sig {
|
|
52
|
+
params(
|
|
53
|
+
action_key: ::String,
|
|
54
|
+
content_ids: T.nilable(T::Array[::String]),
|
|
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
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
72
|
+
def ==(other)
|
|
73
|
+
return false unless other.is_a?(self.class)
|
|
74
|
+
return false unless @action_key == other.action_key
|
|
75
|
+
return false unless @content_ids == other.content_ids
|
|
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
|
|
80
|
+
true
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::ExecuteActionRequestBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::ExecuteActionRequestBody
|
|
9
|
+
def action_key
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def action_key=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def content_ids
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def content_ids=(str_)
|
|
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_)
|
|
43
|
+
end
|
|
44
|
+
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 GetAccountRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# 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
|
+
field(
|
|
16
|
+
:project_id,
|
|
17
|
+
Crystalline::Nilable.new(::String),
|
|
18
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
sig { params(project_id: T.nilable(::String)).void }
|
|
22
|
+
def initialize(project_id: nil)
|
|
23
|
+
@project_id = project_id
|
|
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 @project_id == other.project_id
|
|
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::GetAccountRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetAccountRequest
|
|
9
|
+
def project_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def project_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -13,16 +13,24 @@ module ModerationApi
|
|
|
13
13
|
|
|
14
14
|
# The ID of the action to get.
|
|
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 queue ID
|
|
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,6 +13,12 @@ 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 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
23
|
field(
|
|
18
24
|
:within_days,
|
|
@@ -20,9 +26,10 @@ module ModerationApi
|
|
|
20
26
|
{'query_param': {'field_name': "withinDays", 'style': "form", 'explode': true}}
|
|
21
27
|
)
|
|
22
28
|
|
|
23
|
-
sig { params(id: ::String, within_days: T.nilable(::Integer)).void }
|
|
24
|
-
def initialize(id:, within_days: 30)
|
|
29
|
+
sig { params(id: ::String, project_id: T.nilable(::String), within_days: T.nilable(::Integer)).void }
|
|
30
|
+
def initialize(id:, project_id: nil, within_days: 30)
|
|
25
31
|
@id = id
|
|
32
|
+
@project_id = project_id
|
|
26
33
|
@within_days = within_days
|
|
27
34
|
end
|
|
28
35
|
|
|
@@ -30,6 +37,7 @@ module ModerationApi
|
|
|
30
37
|
def ==(other)
|
|
31
38
|
return false unless other.is_a?(self.class)
|
|
32
39
|
return false unless @id == other.id
|
|
40
|
+
return false unless @project_id == other.project_id
|
|
33
41
|
return false unless @within_days == other.within_days
|
|
34
42
|
true
|
|
35
43
|
end
|
|
@@ -13,16 +13,24 @@ module ModerationApi
|
|
|
13
13
|
|
|
14
14
|
# The ID of the webhook to get.
|
|
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
|
|
@@ -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 GetWebhookSecretRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# 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
|
+
field(
|
|
16
|
+
:project_id,
|
|
17
|
+
Crystalline::Nilable.new(::String),
|
|
18
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
sig { params(project_id: T.nilable(::String)).void }
|
|
22
|
+
def initialize(project_id: nil)
|
|
23
|
+
@project_id = project_id
|
|
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 @project_id == other.project_id
|
|
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::GetWebhookSecretRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetWebhookSecretRequest
|
|
9
|
+
def project_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def project_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -13,16 +13,24 @@ module ModerationApi
|
|
|
13
13
|
|
|
14
14
|
# ID of the wordlist to get
|
|
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
|
# ID of the wordlist to check embedding status for
|
|
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
|
|
@@ -16,6 +16,12 @@ module ModerationApi
|
|
|
16
16
|
Crystalline::Nilable.new(::String),
|
|
17
17
|
{'query_param': {'field_name': "queueId", 'style': "form", 'explode': true}}
|
|
18
18
|
)
|
|
19
|
+
# 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.
|
|
20
|
+
field(
|
|
21
|
+
:project_id,
|
|
22
|
+
Crystalline::Nilable.new(::String),
|
|
23
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
24
|
+
)
|
|
19
25
|
|
|
20
26
|
field(
|
|
21
27
|
:page,
|
|
@@ -29,9 +35,18 @@ module ModerationApi
|
|
|
29
35
|
{'query_param': {'field_name': "pageSize", 'style': "form", 'explode': true}}
|
|
30
36
|
)
|
|
31
37
|
|
|
32
|
-
sig {
|
|
33
|
-
|
|
38
|
+
sig {
|
|
39
|
+
params(
|
|
40
|
+
queue_id: T.nilable(::String),
|
|
41
|
+
project_id: T.nilable(::String),
|
|
42
|
+
page: T.nilable(::Integer),
|
|
43
|
+
page_size: T.nilable(::Integer)
|
|
44
|
+
)
|
|
45
|
+
.void
|
|
46
|
+
}
|
|
47
|
+
def initialize(queue_id: nil, project_id: nil, page: 1, page_size: 20)
|
|
34
48
|
@queue_id = queue_id
|
|
49
|
+
@project_id = project_id
|
|
35
50
|
@page = page
|
|
36
51
|
@page_size = page_size
|
|
37
52
|
end
|
|
@@ -40,6 +55,7 @@ module ModerationApi
|
|
|
40
55
|
def ==(other)
|
|
41
56
|
return false unless other.is_a?(self.class)
|
|
42
57
|
return false unless @queue_id == other.queue_id
|
|
58
|
+
return false unless @project_id == other.project_id
|
|
43
59
|
return false unless @page == other.page
|
|
44
60
|
return false unless @page_size == other.page_size
|
|
45
61
|
true
|
|
@@ -34,6 +34,12 @@ module ModerationApi
|
|
|
34
34
|
Crystalline::Nilable.new(Crystalline::Array.new(::String)),
|
|
35
35
|
{'query_param': {'field_name': "contentTypes", 'style': "form", 'explode': true}}
|
|
36
36
|
)
|
|
37
|
+
# 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.
|
|
38
|
+
field(
|
|
39
|
+
:project_id,
|
|
40
|
+
Crystalline::Nilable.new(::String),
|
|
41
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
42
|
+
)
|
|
37
43
|
|
|
38
44
|
field(
|
|
39
45
|
:page,
|
|
@@ -59,6 +65,7 @@ module ModerationApi
|
|
|
59
65
|
member_since_date: T.nilable(::String),
|
|
60
66
|
last_active_date: T.nilable(::String),
|
|
61
67
|
content_types: T.nilable(T::Array[::String]),
|
|
68
|
+
project_id: T.nilable(::String),
|
|
62
69
|
page: T.nilable(::Integer),
|
|
63
70
|
page_size: T.nilable(::Integer),
|
|
64
71
|
sort_direction: T.nilable(Models::Operations::ListAuthorsSortDirection)
|
|
@@ -70,6 +77,7 @@ module ModerationApi
|
|
|
70
77
|
member_since_date: nil,
|
|
71
78
|
last_active_date: nil,
|
|
72
79
|
content_types: nil,
|
|
80
|
+
project_id: nil,
|
|
73
81
|
page: 1,
|
|
74
82
|
page_size: 20,
|
|
75
83
|
sort_direction: Models::Operations::ListAuthorsSortDirection::DESC
|
|
@@ -78,6 +86,7 @@ module ModerationApi
|
|
|
78
86
|
@member_since_date = member_since_date
|
|
79
87
|
@last_active_date = last_active_date
|
|
80
88
|
@content_types = content_types
|
|
89
|
+
@project_id = project_id
|
|
81
90
|
@page = page
|
|
82
91
|
@page_size = page_size
|
|
83
92
|
@sort_direction = sort_direction
|
|
@@ -90,6 +99,7 @@ module ModerationApi
|
|
|
90
99
|
return false unless @member_since_date == other.member_since_date
|
|
91
100
|
return false unless @last_active_date == other.last_active_date
|
|
92
101
|
return false unless @content_types == other.content_types
|
|
102
|
+
return false unless @project_id == other.project_id
|
|
93
103
|
return false unless @page == other.page
|
|
94
104
|
return false unless @page_size == other.page_size
|
|
95
105
|
return false unless @sort_direction == other.sort_direction
|