safetykit 0.53.0 → 0.54.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/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/safety_kit/models/content_create_params.rb +5 -6
- data/lib/safety_kit/models/content_create_response.rb +7 -41
- data/lib/safety_kit/resources/content.rb +4 -4
- data/lib/safety_kit/version.rb +1 -1
- data/rbi/safety_kit/models/content_create_params.rbi +6 -8
- data/rbi/safety_kit/models/content_create_response.rbi +6 -66
- data/rbi/safety_kit/resources/content.rbi +5 -6
- data/sig/safety_kit/models/content_create_response.rbs +0 -17
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3940fe0cd96efc27d41bf5e435769504809af46453f457e210009cc7984054f7
|
|
4
|
+
data.tar.gz: 1091f431d55165f712b327cb01b806eea5df1c0a3f9591d47ddc6d9d92090ece
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b4103c14298b4ca6bccf47cb52d3f093a9864d00d85242587b36f3029ac8ecee8097dd7413e7506f4abd4a16dec273041e0cd9b70f7493d666128bb3003c777
|
|
7
|
+
data.tar.gz: b67aa63c04b3e02921d364e307baafa4508a3dea6fd3ead32cd2f8f392873b5c65ca8dc6b17726c4c64d13f53cbc356340de536032a6a96ee3772b03b11af308
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.54.0 (2026-08-06)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.53.0...v0.54.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.53.0...v0.54.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([d4f948d](https://github.com/GetSafetyKit/safetykit-ruby/commit/d4f948d151496411504a069e14144de5fbe6e9ce))
|
|
10
|
+
|
|
3
11
|
## 0.53.0 (2026-08-06)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.52.0...v0.53.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.52.0...v0.53.0)
|
data/README.md
CHANGED
|
@@ -14,15 +14,14 @@ module SafetyKit
|
|
|
14
14
|
required :user_id, String
|
|
15
15
|
|
|
16
16
|
# @!attribute content_id
|
|
17
|
-
# Your
|
|
18
|
-
# Prevents double-counting content submitted to both endpoints.
|
|
17
|
+
# Your content identifier.
|
|
19
18
|
#
|
|
20
19
|
# @return [String, nil]
|
|
21
20
|
optional :content_id, String
|
|
22
21
|
|
|
23
22
|
# @!attribute images
|
|
24
23
|
# Images to classify, each as base64-encoded image bytes, raw or as a data URI. At
|
|
25
|
-
# most
|
|
24
|
+
# most 5MB each.
|
|
26
25
|
#
|
|
27
26
|
# @return [Array<String>, nil]
|
|
28
27
|
optional :images, SafetyKit::Internal::Type::ArrayOf[String]
|
|
@@ -34,7 +33,7 @@ module SafetyKit
|
|
|
34
33
|
optional :metadata, SafetyKit::Internal::Type::HashOf[SafetyKit::Internal::Type::Unknown, nil?: true]
|
|
35
34
|
|
|
36
35
|
# @!attribute text
|
|
37
|
-
# User-authored text to classify.
|
|
36
|
+
# User-authored text to classify.
|
|
38
37
|
#
|
|
39
38
|
# @return [String, nil]
|
|
40
39
|
optional :text, String
|
|
@@ -45,13 +44,13 @@ module SafetyKit
|
|
|
45
44
|
#
|
|
46
45
|
# @param user_id [String] Your stable identifier for the user this content belongs to.
|
|
47
46
|
#
|
|
48
|
-
# @param content_id [String] Your
|
|
47
|
+
# @param content_id [String] Your content identifier.
|
|
49
48
|
#
|
|
50
49
|
# @param images [Array<String>] Images to classify, each as base64-encoded image bytes, raw or as a data URI. At
|
|
51
50
|
#
|
|
52
51
|
# @param metadata [Hash{Symbol=>Object, nil}] Additional product context for this content. At most 8KB when serialized.
|
|
53
52
|
#
|
|
54
|
-
# @param text [String] User-authored text to classify.
|
|
53
|
+
# @param text [String] User-authored text to classify.
|
|
55
54
|
#
|
|
56
55
|
# @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}]
|
|
57
56
|
end
|
|
@@ -10,13 +10,6 @@ module SafetyKit
|
|
|
10
10
|
# @return [String]
|
|
11
11
|
required :content_id, String
|
|
12
12
|
|
|
13
|
-
# @!attribute decision
|
|
14
|
-
# Overall decision: match if any policy matched, review if any policy needs
|
|
15
|
-
# review, not_match otherwise.
|
|
16
|
-
#
|
|
17
|
-
# @return [Symbol, SafetyKit::Models::ContentCreateResponse::Decision]
|
|
18
|
-
required :decision, enum: -> { SafetyKit::Models::ContentCreateResponse::Decision }
|
|
19
|
-
|
|
20
13
|
# @!attribute policies
|
|
21
14
|
# Per-policy results for the submitted content.
|
|
22
15
|
#
|
|
@@ -37,48 +30,26 @@ module SafetyKit
|
|
|
37
30
|
# @return [String]
|
|
38
31
|
required :user_id, String
|
|
39
32
|
|
|
40
|
-
# @!method initialize(content_id:,
|
|
41
|
-
# Some parameter documentations has been truncated, see
|
|
42
|
-
# {SafetyKit::Models::ContentCreateResponse} for more details.
|
|
43
|
-
#
|
|
33
|
+
# @!method initialize(content_id:, policies:, reference_set_matches:, user_id:)
|
|
44
34
|
# Synchronous classification result for the submitted content.
|
|
45
35
|
#
|
|
46
36
|
# @param content_id [String] SafetyKit identifier for the classified content.
|
|
47
37
|
#
|
|
48
|
-
# @param decision [Symbol, SafetyKit::Models::ContentCreateResponse::Decision] Overall decision: match if any policy matched, review if any policy needs review
|
|
49
|
-
#
|
|
50
38
|
# @param policies [Array<SafetyKit::Models::ContentCreateResponse::Policy>] Per-policy results for the submitted content.
|
|
51
39
|
#
|
|
52
40
|
# @param reference_set_matches [Array<SafetyKit::Models::ContentCreateResponse::ReferenceSetMatch>] Reference set matches found for the submitted content.
|
|
53
41
|
#
|
|
54
42
|
# @param user_id [String] The user_id from the request.
|
|
55
43
|
|
|
56
|
-
# Overall decision: match if any policy matched, review if any policy needs
|
|
57
|
-
# review, not_match otherwise.
|
|
58
|
-
#
|
|
59
|
-
# @see SafetyKit::Models::ContentCreateResponse#decision
|
|
60
|
-
module Decision
|
|
61
|
-
extend SafetyKit::Internal::Type::Enum
|
|
62
|
-
|
|
63
|
-
MATCH = :match
|
|
64
|
-
NOT_MATCH = :not_match
|
|
65
|
-
REVIEW = :review
|
|
66
|
-
|
|
67
|
-
# @!method self.values
|
|
68
|
-
# @return [Array<Symbol>]
|
|
69
|
-
end
|
|
70
|
-
|
|
71
44
|
class Policy < SafetyKit::Internal::Type::BaseModel
|
|
72
45
|
# @!attribute decision
|
|
73
|
-
#
|
|
74
|
-
# not violate), or review (needs human review).
|
|
46
|
+
# Whether the submitted content violates the policy.
|
|
75
47
|
#
|
|
76
48
|
# @return [Symbol, SafetyKit::Models::ContentCreateResponse::Policy::Decision]
|
|
77
49
|
required :decision, enum: -> { SafetyKit::Models::ContentCreateResponse::Policy::Decision }
|
|
78
50
|
|
|
79
51
|
# @!attribute escalation
|
|
80
|
-
# Escalation outcome
|
|
81
|
-
# decision), or timed_out (decision is a provisional review).
|
|
52
|
+
# Escalation outcome for this policy.
|
|
82
53
|
#
|
|
83
54
|
# @return [Symbol, SafetyKit::Models::ContentCreateResponse::Policy::Escalation]
|
|
84
55
|
required :escalation, enum: -> { SafetyKit::Models::ContentCreateResponse::Policy::Escalation }
|
|
@@ -102,14 +73,11 @@ module SafetyKit
|
|
|
102
73
|
required :version, String
|
|
103
74
|
|
|
104
75
|
# @!method initialize(decision:, escalation:, policy_id:, score:, version:)
|
|
105
|
-
# Some parameter documentations has been truncated, see
|
|
106
|
-
# {SafetyKit::Models::ContentCreateResponse::Policy} for more details.
|
|
107
|
-
#
|
|
108
76
|
# Result for one policy evaluated against the submitted content.
|
|
109
77
|
#
|
|
110
|
-
# @param decision [Symbol, SafetyKit::Models::ContentCreateResponse::Policy::Decision]
|
|
78
|
+
# @param decision [Symbol, SafetyKit::Models::ContentCreateResponse::Policy::Decision] Whether the submitted content violates the policy.
|
|
111
79
|
#
|
|
112
|
-
# @param escalation [Symbol, SafetyKit::Models::ContentCreateResponse::Policy::Escalation] Escalation outcome
|
|
80
|
+
# @param escalation [Symbol, SafetyKit::Models::ContentCreateResponse::Policy::Escalation] Escalation outcome for this policy.
|
|
113
81
|
#
|
|
114
82
|
# @param policy_id [String] Identifier of the policy.
|
|
115
83
|
#
|
|
@@ -117,8 +85,7 @@ module SafetyKit
|
|
|
117
85
|
#
|
|
118
86
|
# @param version [String] Version of the policy.
|
|
119
87
|
|
|
120
|
-
#
|
|
121
|
-
# not violate), or review (needs human review).
|
|
88
|
+
# Whether the submitted content violates the policy.
|
|
122
89
|
#
|
|
123
90
|
# @see SafetyKit::Models::ContentCreateResponse::Policy#decision
|
|
124
91
|
module Decision
|
|
@@ -132,8 +99,7 @@ module SafetyKit
|
|
|
132
99
|
# @return [Array<Symbol>]
|
|
133
100
|
end
|
|
134
101
|
|
|
135
|
-
# Escalation outcome
|
|
136
|
-
# decision), or timed_out (decision is a provisional review).
|
|
102
|
+
# Escalation outcome for this policy.
|
|
137
103
|
#
|
|
138
104
|
# @see SafetyKit::Models::ContentCreateResponse::Policy#escalation
|
|
139
105
|
module Escalation
|
|
@@ -9,20 +9,20 @@ module SafetyKit
|
|
|
9
9
|
# {SafetyKit::Models::ContentCreateParams} for more details.
|
|
10
10
|
#
|
|
11
11
|
# Classify a piece of content synchronously. Send user-authored text, images, or
|
|
12
|
-
# both, and receive per-policy results
|
|
13
|
-
#
|
|
12
|
+
# both, and receive per-policy results in the response. Requests have a maximum
|
|
13
|
+
# size of 6MB.
|
|
14
14
|
#
|
|
15
15
|
# @overload create(user_id:, content_id: nil, images: nil, metadata: nil, text: nil, request_options: {})
|
|
16
16
|
#
|
|
17
17
|
# @param user_id [String] Your stable identifier for the user this content belongs to.
|
|
18
18
|
#
|
|
19
|
-
# @param content_id [String] Your
|
|
19
|
+
# @param content_id [String] Your content identifier.
|
|
20
20
|
#
|
|
21
21
|
# @param images [Array<String>] Images to classify, each as base64-encoded image bytes, raw or as a data URI. At
|
|
22
22
|
#
|
|
23
23
|
# @param metadata [Hash{Symbol=>Object, nil}] Additional product context for this content. At most 8KB when serialized.
|
|
24
24
|
#
|
|
25
|
-
# @param text [String] User-authored text to classify.
|
|
25
|
+
# @param text [String] User-authored text to classify.
|
|
26
26
|
#
|
|
27
27
|
# @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
28
28
|
#
|
data/lib/safety_kit/version.rb
CHANGED
|
@@ -15,8 +15,7 @@ module SafetyKit
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :user_id
|
|
17
17
|
|
|
18
|
-
# Your
|
|
19
|
-
# Prevents double-counting content submitted to both endpoints.
|
|
18
|
+
# Your content identifier.
|
|
20
19
|
sig { returns(T.nilable(String)) }
|
|
21
20
|
attr_reader :content_id
|
|
22
21
|
|
|
@@ -24,7 +23,7 @@ module SafetyKit
|
|
|
24
23
|
attr_writer :content_id
|
|
25
24
|
|
|
26
25
|
# Images to classify, each as base64-encoded image bytes, raw or as a data URI. At
|
|
27
|
-
# most
|
|
26
|
+
# most 5MB each.
|
|
28
27
|
sig { returns(T.nilable(T::Array[String])) }
|
|
29
28
|
attr_reader :images
|
|
30
29
|
|
|
@@ -38,7 +37,7 @@ module SafetyKit
|
|
|
38
37
|
sig { params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void }
|
|
39
38
|
attr_writer :metadata
|
|
40
39
|
|
|
41
|
-
# User-authored text to classify.
|
|
40
|
+
# User-authored text to classify.
|
|
42
41
|
sig { returns(T.nilable(String)) }
|
|
43
42
|
attr_reader :text
|
|
44
43
|
|
|
@@ -58,15 +57,14 @@ module SafetyKit
|
|
|
58
57
|
def self.new(
|
|
59
58
|
# Your stable identifier for the user this content belongs to.
|
|
60
59
|
user_id:,
|
|
61
|
-
# Your
|
|
62
|
-
# Prevents double-counting content submitted to both endpoints.
|
|
60
|
+
# Your content identifier.
|
|
63
61
|
content_id: nil,
|
|
64
62
|
# Images to classify, each as base64-encoded image bytes, raw or as a data URI. At
|
|
65
|
-
# most
|
|
63
|
+
# most 5MB each.
|
|
66
64
|
images: nil,
|
|
67
65
|
# Additional product context for this content. At most 8KB when serialized.
|
|
68
66
|
metadata: nil,
|
|
69
|
-
# User-authored text to classify.
|
|
67
|
+
# User-authored text to classify.
|
|
70
68
|
text: nil,
|
|
71
69
|
request_options: {}
|
|
72
70
|
)
|
|
@@ -15,15 +15,6 @@ module SafetyKit
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :content_id
|
|
17
17
|
|
|
18
|
-
# Overall decision: match if any policy matched, review if any policy needs
|
|
19
|
-
# review, not_match otherwise.
|
|
20
|
-
sig do
|
|
21
|
-
returns(
|
|
22
|
-
SafetyKit::Models::ContentCreateResponse::Decision::TaggedSymbol
|
|
23
|
-
)
|
|
24
|
-
end
|
|
25
|
-
attr_accessor :decision
|
|
26
|
-
|
|
27
18
|
# Per-policy results for the submitted content.
|
|
28
19
|
sig do
|
|
29
20
|
returns(T::Array[SafetyKit::Models::ContentCreateResponse::Policy])
|
|
@@ -46,8 +37,6 @@ module SafetyKit
|
|
|
46
37
|
sig do
|
|
47
38
|
params(
|
|
48
39
|
content_id: String,
|
|
49
|
-
decision:
|
|
50
|
-
SafetyKit::Models::ContentCreateResponse::Decision::OrSymbol,
|
|
51
40
|
policies:
|
|
52
41
|
T::Array[SafetyKit::Models::ContentCreateResponse::Policy::OrHash],
|
|
53
42
|
reference_set_matches:
|
|
@@ -60,9 +49,6 @@ module SafetyKit
|
|
|
60
49
|
def self.new(
|
|
61
50
|
# SafetyKit identifier for the classified content.
|
|
62
51
|
content_id:,
|
|
63
|
-
# Overall decision: match if any policy matched, review if any policy needs
|
|
64
|
-
# review, not_match otherwise.
|
|
65
|
-
decision:,
|
|
66
52
|
# Per-policy results for the submitted content.
|
|
67
53
|
policies:,
|
|
68
54
|
# Reference set matches found for the submitted content.
|
|
@@ -76,8 +62,6 @@ module SafetyKit
|
|
|
76
62
|
override.returns(
|
|
77
63
|
{
|
|
78
64
|
content_id: String,
|
|
79
|
-
decision:
|
|
80
|
-
SafetyKit::Models::ContentCreateResponse::Decision::TaggedSymbol,
|
|
81
65
|
policies:
|
|
82
66
|
T::Array[SafetyKit::Models::ContentCreateResponse::Policy],
|
|
83
67
|
reference_set_matches:
|
|
@@ -91,44 +75,6 @@ module SafetyKit
|
|
|
91
75
|
def to_hash
|
|
92
76
|
end
|
|
93
77
|
|
|
94
|
-
# Overall decision: match if any policy matched, review if any policy needs
|
|
95
|
-
# review, not_match otherwise.
|
|
96
|
-
module Decision
|
|
97
|
-
extend SafetyKit::Internal::Type::Enum
|
|
98
|
-
|
|
99
|
-
TaggedSymbol =
|
|
100
|
-
T.type_alias do
|
|
101
|
-
T.all(Symbol, SafetyKit::Models::ContentCreateResponse::Decision)
|
|
102
|
-
end
|
|
103
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
104
|
-
|
|
105
|
-
MATCH =
|
|
106
|
-
T.let(
|
|
107
|
-
:match,
|
|
108
|
-
SafetyKit::Models::ContentCreateResponse::Decision::TaggedSymbol
|
|
109
|
-
)
|
|
110
|
-
NOT_MATCH =
|
|
111
|
-
T.let(
|
|
112
|
-
:not_match,
|
|
113
|
-
SafetyKit::Models::ContentCreateResponse::Decision::TaggedSymbol
|
|
114
|
-
)
|
|
115
|
-
REVIEW =
|
|
116
|
-
T.let(
|
|
117
|
-
:review,
|
|
118
|
-
SafetyKit::Models::ContentCreateResponse::Decision::TaggedSymbol
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
sig do
|
|
122
|
-
override.returns(
|
|
123
|
-
T::Array[
|
|
124
|
-
SafetyKit::Models::ContentCreateResponse::Decision::TaggedSymbol
|
|
125
|
-
]
|
|
126
|
-
)
|
|
127
|
-
end
|
|
128
|
-
def self.values
|
|
129
|
-
end
|
|
130
|
-
end
|
|
131
|
-
|
|
132
78
|
class Policy < SafetyKit::Internal::Type::BaseModel
|
|
133
79
|
OrHash =
|
|
134
80
|
T.type_alias do
|
|
@@ -138,8 +84,7 @@ module SafetyKit
|
|
|
138
84
|
)
|
|
139
85
|
end
|
|
140
86
|
|
|
141
|
-
#
|
|
142
|
-
# not violate), or review (needs human review).
|
|
87
|
+
# Whether the submitted content violates the policy.
|
|
143
88
|
sig do
|
|
144
89
|
returns(
|
|
145
90
|
SafetyKit::Models::ContentCreateResponse::Policy::Decision::TaggedSymbol
|
|
@@ -147,8 +92,7 @@ module SafetyKit
|
|
|
147
92
|
end
|
|
148
93
|
attr_accessor :decision
|
|
149
94
|
|
|
150
|
-
# Escalation outcome
|
|
151
|
-
# decision), or timed_out (decision is a provisional review).
|
|
95
|
+
# Escalation outcome for this policy.
|
|
152
96
|
sig do
|
|
153
97
|
returns(
|
|
154
98
|
SafetyKit::Models::ContentCreateResponse::Policy::Escalation::TaggedSymbol
|
|
@@ -181,11 +125,9 @@ module SafetyKit
|
|
|
181
125
|
).returns(T.attached_class)
|
|
182
126
|
end
|
|
183
127
|
def self.new(
|
|
184
|
-
#
|
|
185
|
-
# not violate), or review (needs human review).
|
|
128
|
+
# Whether the submitted content violates the policy.
|
|
186
129
|
decision:,
|
|
187
|
-
# Escalation outcome
|
|
188
|
-
# decision), or timed_out (decision is a provisional review).
|
|
130
|
+
# Escalation outcome for this policy.
|
|
189
131
|
escalation:,
|
|
190
132
|
# Identifier of the policy.
|
|
191
133
|
policy_id:,
|
|
@@ -212,8 +154,7 @@ module SafetyKit
|
|
|
212
154
|
def to_hash
|
|
213
155
|
end
|
|
214
156
|
|
|
215
|
-
#
|
|
216
|
-
# not violate), or review (needs human review).
|
|
157
|
+
# Whether the submitted content violates the policy.
|
|
217
158
|
module Decision
|
|
218
159
|
extend SafetyKit::Internal::Type::Enum
|
|
219
160
|
|
|
@@ -253,8 +194,7 @@ module SafetyKit
|
|
|
253
194
|
end
|
|
254
195
|
end
|
|
255
196
|
|
|
256
|
-
# Escalation outcome
|
|
257
|
-
# decision), or timed_out (decision is a provisional review).
|
|
197
|
+
# Escalation outcome for this policy.
|
|
258
198
|
module Escalation
|
|
259
199
|
extend SafetyKit::Internal::Type::Enum
|
|
260
200
|
|
|
@@ -6,8 +6,8 @@ module SafetyKit
|
|
|
6
6
|
# the response.
|
|
7
7
|
class Content
|
|
8
8
|
# Classify a piece of content synchronously. Send user-authored text, images, or
|
|
9
|
-
# both, and receive per-policy results
|
|
10
|
-
#
|
|
9
|
+
# both, and receive per-policy results in the response. Requests have a maximum
|
|
10
|
+
# size of 6MB.
|
|
11
11
|
sig do
|
|
12
12
|
params(
|
|
13
13
|
user_id: String,
|
|
@@ -21,15 +21,14 @@ module SafetyKit
|
|
|
21
21
|
def create(
|
|
22
22
|
# Your stable identifier for the user this content belongs to.
|
|
23
23
|
user_id:,
|
|
24
|
-
# Your
|
|
25
|
-
# Prevents double-counting content submitted to both endpoints.
|
|
24
|
+
# Your content identifier.
|
|
26
25
|
content_id: nil,
|
|
27
26
|
# Images to classify, each as base64-encoded image bytes, raw or as a data URI. At
|
|
28
|
-
# most
|
|
27
|
+
# most 5MB each.
|
|
29
28
|
images: nil,
|
|
30
29
|
# Additional product context for this content. At most 8KB when serialized.
|
|
31
30
|
metadata: nil,
|
|
32
|
-
# User-authored text to classify.
|
|
31
|
+
# User-authored text to classify.
|
|
33
32
|
text: nil,
|
|
34
33
|
request_options: {}
|
|
35
34
|
)
|
|
@@ -3,7 +3,6 @@ module SafetyKit
|
|
|
3
3
|
type content_create_response =
|
|
4
4
|
{
|
|
5
5
|
content_id: String,
|
|
6
|
-
decision: SafetyKit::Models::ContentCreateResponse::decision,
|
|
7
6
|
policies: ::Array[SafetyKit::Models::ContentCreateResponse::Policy],
|
|
8
7
|
reference_set_matches: ::Array[SafetyKit::Models::ContentCreateResponse::ReferenceSetMatch],
|
|
9
8
|
user_id: String
|
|
@@ -12,8 +11,6 @@ module SafetyKit
|
|
|
12
11
|
class ContentCreateResponse < SafetyKit::Internal::Type::BaseModel
|
|
13
12
|
attr_accessor content_id: String
|
|
14
13
|
|
|
15
|
-
attr_accessor decision: SafetyKit::Models::ContentCreateResponse::decision
|
|
16
|
-
|
|
17
14
|
attr_accessor policies: ::Array[SafetyKit::Models::ContentCreateResponse::Policy]
|
|
18
15
|
|
|
19
16
|
attr_accessor reference_set_matches: ::Array[SafetyKit::Models::ContentCreateResponse::ReferenceSetMatch]
|
|
@@ -22,7 +19,6 @@ module SafetyKit
|
|
|
22
19
|
|
|
23
20
|
def initialize: (
|
|
24
21
|
content_id: String,
|
|
25
|
-
decision: SafetyKit::Models::ContentCreateResponse::decision,
|
|
26
22
|
policies: ::Array[SafetyKit::Models::ContentCreateResponse::Policy],
|
|
27
23
|
reference_set_matches: ::Array[SafetyKit::Models::ContentCreateResponse::ReferenceSetMatch],
|
|
28
24
|
user_id: String
|
|
@@ -30,24 +26,11 @@ module SafetyKit
|
|
|
30
26
|
|
|
31
27
|
def to_hash: -> {
|
|
32
28
|
content_id: String,
|
|
33
|
-
decision: SafetyKit::Models::ContentCreateResponse::decision,
|
|
34
29
|
policies: ::Array[SafetyKit::Models::ContentCreateResponse::Policy],
|
|
35
30
|
reference_set_matches: ::Array[SafetyKit::Models::ContentCreateResponse::ReferenceSetMatch],
|
|
36
31
|
user_id: String
|
|
37
32
|
}
|
|
38
33
|
|
|
39
|
-
type decision = :match | :not_match | :review
|
|
40
|
-
|
|
41
|
-
module Decision
|
|
42
|
-
extend SafetyKit::Internal::Type::Enum
|
|
43
|
-
|
|
44
|
-
MATCH: :match
|
|
45
|
-
NOT_MATCH: :not_match
|
|
46
|
-
REVIEW: :review
|
|
47
|
-
|
|
48
|
-
def self?.values: -> ::Array[SafetyKit::Models::ContentCreateResponse::decision]
|
|
49
|
-
end
|
|
50
|
-
|
|
51
34
|
type policy =
|
|
52
35
|
{
|
|
53
36
|
decision: SafetyKit::Models::ContentCreateResponse::Policy::decision,
|