safetykit 0.62.0 → 0.63.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 +3 -2
- data/lib/safety_kit/models/content_create_response.rb +13 -1
- data/lib/safety_kit/resources/content.rb +5 -3
- data/lib/safety_kit/version.rb +1 -1
- data/rbi/safety_kit/models/content_create_params.rbi +4 -2
- data/rbi/safety_kit/models/content_create_response.rbi +16 -3
- data/rbi/safety_kit/resources/content.rbi +6 -4
- data/sig/safety_kit/models/content_create_response.rbs +10 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81fa21021d2817ee71454e1a16d72196e480b98e8eb09e0f063fcff447605b2d
|
|
4
|
+
data.tar.gz: 67b2272041f0e0be992e02b33b86dd59366d555abd50cc8d947f61facc4d972d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57f7fddc7d40035c8b6fc66541ea9ede92702b15fbb65a1be57456cb9155f0b024dddab69b65edbc3679ad3d3f9d0b2636418577b86fb94264bea5b48204aef9
|
|
7
|
+
data.tar.gz: d408e395d84ae8d79474b7be876fe09338f057c27ea3fe33f12102defa67204fd284a8b0b87af4df7dd1d861c356839a419228e09af7137b8c402c8c5e1ac5b1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.63.0 (2026-08-19)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.62.0...v0.63.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.62.0...v0.63.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([9cecd7f](https://github.com/GetSafetyKit/safetykit-ruby/commit/9cecd7fef16f48e93b3093b4dda18418413b44e9))
|
|
10
|
+
|
|
3
11
|
## 0.62.0 (2026-08-13)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.61.0...v0.62.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.61.0...v0.62.0)
|
data/README.md
CHANGED
|
@@ -29,7 +29,8 @@ module SafetyKit
|
|
|
29
29
|
optional :content_id, String
|
|
30
30
|
|
|
31
31
|
# @!attribute metadata
|
|
32
|
-
# Additional product context for this content
|
|
32
|
+
# Additional product context for this content, echoed back unchanged on the
|
|
33
|
+
# response. At most 8KB when serialized.
|
|
33
34
|
#
|
|
34
35
|
# @return [Hash{Symbol=>Object, nil}, nil]
|
|
35
36
|
optional :metadata, SafetyKit::Internal::Type::HashOf[SafetyKit::Internal::Type::Unknown, nil?: true]
|
|
@@ -50,7 +51,7 @@ module SafetyKit
|
|
|
50
51
|
#
|
|
51
52
|
# @param content_id [String] Your content identifier.
|
|
52
53
|
#
|
|
53
|
-
# @param metadata [Hash{Symbol=>Object, nil}] Additional product context for this content
|
|
54
|
+
# @param metadata [Hash{Symbol=>Object, nil}] Additional product context for this content, echoed back unchanged on the respon
|
|
54
55
|
#
|
|
55
56
|
# @param safety_kit_version [Symbol, SafetyKit::Models::ContentCreateParams::SafetyKitVersion] The API version this operation is defined against.
|
|
56
57
|
#
|
|
@@ -29,7 +29,17 @@ module SafetyKit
|
|
|
29
29
|
# @return [String]
|
|
30
30
|
required :version, String
|
|
31
31
|
|
|
32
|
-
# @!
|
|
32
|
+
# @!attribute metadata
|
|
33
|
+
# The metadata from the request, echoed back unchanged. Absent when the request
|
|
34
|
+
# sent none.
|
|
35
|
+
#
|
|
36
|
+
# @return [Hash{Symbol=>Object, nil}, nil]
|
|
37
|
+
optional :metadata, SafetyKit::Internal::Type::HashOf[SafetyKit::Internal::Type::Unknown, nil?: true]
|
|
38
|
+
|
|
39
|
+
# @!method initialize(content_id:, labels:, user_id:, version:, metadata: nil)
|
|
40
|
+
# Some parameter documentations has been truncated, see
|
|
41
|
+
# {SafetyKit::Models::ContentCreateResponse} for more details.
|
|
42
|
+
#
|
|
33
43
|
# Synchronous classification result for the submitted content.
|
|
34
44
|
#
|
|
35
45
|
# @param content_id [String] SafetyKit identifier for the classified content.
|
|
@@ -39,6 +49,8 @@ module SafetyKit
|
|
|
39
49
|
# @param user_id [String] The user_id from the request.
|
|
40
50
|
#
|
|
41
51
|
# @param version [String] The API version that served this request.
|
|
52
|
+
#
|
|
53
|
+
# @param metadata [Hash{Symbol=>Object, nil}] The metadata from the request, echoed back unchanged. Absent when the request se
|
|
42
54
|
|
|
43
55
|
# Result for one label evaluated against the submitted content.
|
|
44
56
|
module Label
|
|
@@ -9,8 +9,10 @@ module SafetyKit
|
|
|
9
9
|
# {SafetyKit::Models::ContentCreateParams} for more details.
|
|
10
10
|
#
|
|
11
11
|
# Classify a piece of content synchronously. Send text and image parts and receive
|
|
12
|
-
# per-label results in the response.
|
|
13
|
-
#
|
|
12
|
+
# per-label results in the response. Any metadata you send is echoed back on the
|
|
13
|
+
# response, so a decision can be matched to your own request without a side
|
|
14
|
+
# lookup. Requests have a maximum size of 6MB. API version 2026-08-11; see the API
|
|
15
|
+
# versioning guide for superseded versions.
|
|
14
16
|
#
|
|
15
17
|
# Errors: 400 for an invalid body or images, with the failing field in the
|
|
16
18
|
# message. 401 for a missing or invalid API key. 413 for requests over 6MB. 429
|
|
@@ -26,7 +28,7 @@ module SafetyKit
|
|
|
26
28
|
#
|
|
27
29
|
# @param content_id [String] Body param: Your content identifier.
|
|
28
30
|
#
|
|
29
|
-
# @param metadata [Hash{Symbol=>Object, nil}] Body param: Additional product context for this content
|
|
31
|
+
# @param metadata [Hash{Symbol=>Object, nil}] Body param: Additional product context for this content, echoed back unchanged o
|
|
30
32
|
#
|
|
31
33
|
# @param safety_kit_version [Symbol, SafetyKit::Models::ContentCreateParams::SafetyKitVersion] Header param: The API version this operation is defined against.
|
|
32
34
|
#
|
data/lib/safety_kit/version.rb
CHANGED
|
@@ -37,7 +37,8 @@ module SafetyKit
|
|
|
37
37
|
sig { params(content_id: String).void }
|
|
38
38
|
attr_writer :content_id
|
|
39
39
|
|
|
40
|
-
# Additional product context for this content
|
|
40
|
+
# Additional product context for this content, echoed back unchanged on the
|
|
41
|
+
# response. At most 8KB when serialized.
|
|
41
42
|
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
|
|
42
43
|
attr_reader :metadata
|
|
43
44
|
|
|
@@ -86,7 +87,8 @@ module SafetyKit
|
|
|
86
87
|
user_id:,
|
|
87
88
|
# Your content identifier.
|
|
88
89
|
content_id: nil,
|
|
89
|
-
# Additional product context for this content
|
|
90
|
+
# Additional product context for this content, echoed back unchanged on the
|
|
91
|
+
# response. At most 8KB when serialized.
|
|
90
92
|
metadata: nil,
|
|
91
93
|
# The API version this operation is defined against.
|
|
92
94
|
safety_kit_version: nil,
|
|
@@ -31,6 +31,14 @@ module SafetyKit
|
|
|
31
31
|
sig { returns(String) }
|
|
32
32
|
attr_accessor :version
|
|
33
33
|
|
|
34
|
+
# The metadata from the request, echoed back unchanged. Absent when the request
|
|
35
|
+
# sent none.
|
|
36
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
|
|
37
|
+
attr_reader :metadata
|
|
38
|
+
|
|
39
|
+
sig { params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void }
|
|
40
|
+
attr_writer :metadata
|
|
41
|
+
|
|
34
42
|
# Synchronous classification result for the submitted content.
|
|
35
43
|
sig do
|
|
36
44
|
params(
|
|
@@ -43,7 +51,8 @@ module SafetyKit
|
|
|
43
51
|
)
|
|
44
52
|
],
|
|
45
53
|
user_id: String,
|
|
46
|
-
version: String
|
|
54
|
+
version: String,
|
|
55
|
+
metadata: T::Hash[Symbol, T.nilable(T.anything)]
|
|
47
56
|
).returns(T.attached_class)
|
|
48
57
|
end
|
|
49
58
|
def self.new(
|
|
@@ -54,7 +63,10 @@ module SafetyKit
|
|
|
54
63
|
# The user_id from the request.
|
|
55
64
|
user_id:,
|
|
56
65
|
# The API version that served this request.
|
|
57
|
-
version
|
|
66
|
+
version:,
|
|
67
|
+
# The metadata from the request, echoed back unchanged. Absent when the request
|
|
68
|
+
# sent none.
|
|
69
|
+
metadata: nil
|
|
58
70
|
)
|
|
59
71
|
end
|
|
60
72
|
|
|
@@ -67,7 +79,8 @@ module SafetyKit
|
|
|
67
79
|
SafetyKit::Models::ContentCreateResponse::Label::Variants
|
|
68
80
|
],
|
|
69
81
|
user_id: String,
|
|
70
|
-
version: String
|
|
82
|
+
version: String,
|
|
83
|
+
metadata: T::Hash[Symbol, T.nilable(T.anything)]
|
|
71
84
|
}
|
|
72
85
|
)
|
|
73
86
|
end
|
|
@@ -6,8 +6,10 @@ module SafetyKit
|
|
|
6
6
|
# the response.
|
|
7
7
|
class Content
|
|
8
8
|
# Classify a piece of content synchronously. Send text and image parts and receive
|
|
9
|
-
# per-label results in the response.
|
|
10
|
-
#
|
|
9
|
+
# per-label results in the response. Any metadata you send is echoed back on the
|
|
10
|
+
# response, so a decision can be matched to your own request without a side
|
|
11
|
+
# lookup. Requests have a maximum size of 6MB. API version 2026-08-11; see the API
|
|
12
|
+
# versioning guide for superseded versions.
|
|
11
13
|
#
|
|
12
14
|
# Errors: 400 for an invalid body or images, with the failing field in the
|
|
13
15
|
# message. 401 for a missing or invalid API key. 413 for requests over 6MB. 429
|
|
@@ -40,8 +42,8 @@ module SafetyKit
|
|
|
40
42
|
user_id:,
|
|
41
43
|
# Body param: Your content identifier.
|
|
42
44
|
content_id: nil,
|
|
43
|
-
# Body param: Additional product context for this content
|
|
44
|
-
# serialized.
|
|
45
|
+
# Body param: Additional product context for this content, echoed back unchanged
|
|
46
|
+
# on the response. At most 8KB when serialized.
|
|
45
47
|
metadata: nil,
|
|
46
48
|
# Header param: The API version this operation is defined against.
|
|
47
49
|
safety_kit_version: nil,
|
|
@@ -5,7 +5,8 @@ module SafetyKit
|
|
|
5
5
|
content_id: String,
|
|
6
6
|
labels: ::Array[SafetyKit::Models::ContentCreateResponse::label],
|
|
7
7
|
user_id: String,
|
|
8
|
-
version: String
|
|
8
|
+
version: String,
|
|
9
|
+
metadata: ::Hash[Symbol, top?]
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
class ContentCreateResponse < SafetyKit::Internal::Type::BaseModel
|
|
@@ -17,18 +18,24 @@ module SafetyKit
|
|
|
17
18
|
|
|
18
19
|
attr_accessor version: String
|
|
19
20
|
|
|
21
|
+
attr_reader metadata: ::Hash[Symbol, top?]?
|
|
22
|
+
|
|
23
|
+
def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?]
|
|
24
|
+
|
|
20
25
|
def initialize: (
|
|
21
26
|
content_id: String,
|
|
22
27
|
labels: ::Array[SafetyKit::Models::ContentCreateResponse::label],
|
|
23
28
|
user_id: String,
|
|
24
|
-
version: String
|
|
29
|
+
version: String,
|
|
30
|
+
?metadata: ::Hash[Symbol, top?]
|
|
25
31
|
) -> void
|
|
26
32
|
|
|
27
33
|
def to_hash: -> {
|
|
28
34
|
content_id: String,
|
|
29
35
|
labels: ::Array[SafetyKit::Models::ContentCreateResponse::label],
|
|
30
36
|
user_id: String,
|
|
31
|
-
version: String
|
|
37
|
+
version: String,
|
|
38
|
+
metadata: ::Hash[Symbol, top?]
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
type label =
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: safetykit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.63.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Safetykit
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|