safetykit 0.49.0 → 0.50.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffe5ac9eeb7e3772d15ac6cd4050b50ce60db643f95f7a372568f8d063584730
4
- data.tar.gz: 6a2fd2adb3656d26d80c6f3dd9dd6d21d21f716d8d47c96a79575c4d3c68ce91
3
+ metadata.gz: 3be0223c948a999f249d8f68585345ec7d96040de4b4b18256a29d7af8b1b662
4
+ data.tar.gz: 9863631b6583962919497f97a27ddbde318e13b18d66ed3ccc724d1cd0f924c7
5
5
  SHA512:
6
- metadata.gz: 0f7d6ee8836e86ed525ef0a6f40321dbc75fa6e97b2065ec5e9eec16a32146f241c3774008b8b28965dc4e95d6576e74cbfa4fde0930a051b787fcdfb6347ae6
7
- data.tar.gz: ccd6fbacb38d4935fb20d07aeb125a75a0601e5244b491e55e094fd11d980f3837aa5acb59bd5263778c27125f56ed0448a9754501a6eaf9c73b1bd8e03ca882
6
+ metadata.gz: c1e231c7fafe07d840d93848166f1bedeef1ded22f991ab97e5c22aeb9d88a255d6de0065da5cb91c414178c327c4f65ec9e2dba62f3b38154b191ec470b9a90
7
+ data.tar.gz: a3369ab0dfb03b3579926ca0e8edd36bce0a927d8350f4d25bce7c8aa8da527a4868206cb7b28445dc9367e08fb4ded3d13fb5deccda8ebd39f552c08e8ea520
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.50.0 (2026-08-01)
4
+
5
+ Full Changelog: [v0.49.0...v0.50.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.49.0...v0.50.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([0f2676b](https://github.com/GetSafetyKit/safetykit-ruby/commit/0f2676b4f1b89391e398e1ae101f70de5bd07772))
10
+
3
11
  ## 0.49.0 (2026-07-31)
4
12
 
5
13
  Full Changelog: [v0.48.0...v0.49.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.48.0...v0.49.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "safetykit", "~> 0.49.0"
20
+ gem "safetykit", "~> 0.50.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -37,7 +37,15 @@ module SafetyKit
37
37
  # @return [String, nil]
38
38
  optional :frame_id, String
39
39
 
40
- # @!method initialize(namespace:, image_data_uri:, stream_id:, timestamp:, frame_id: nil, request_options: {})
40
+ # @!attribute metadata
41
+ # Arbitrary key-value metadata to associate with this frame, at most 8192 bytes
42
+ # when serialized. If a violation is detected on this frame, the metadata is
43
+ # echoed back verbatim in the live_video.violation_detected webhook.
44
+ #
45
+ # @return [Hash{Symbol=>Object, nil}, nil]
46
+ optional :metadata, SafetyKit::Internal::Type::HashOf[SafetyKit::Internal::Type::Unknown, nil?: true]
47
+
48
+ # @!method initialize(namespace:, image_data_uri:, stream_id:, timestamp:, frame_id: nil, metadata: nil, request_options: {})
41
49
  # Some parameter documentations has been truncated, see
42
50
  # {SafetyKit::Models::StreamAddFrameParams} for more details.
43
51
  #
@@ -51,6 +59,8 @@ module SafetyKit
51
59
  #
52
60
  # @param frame_id [String]
53
61
  #
62
+ # @param metadata [Hash{Symbol=>Object, nil}] Arbitrary key-value metadata to associate with this frame, at most 8192 bytes wh
63
+ #
54
64
  # @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}]
55
65
  end
56
66
  end
@@ -43,7 +43,7 @@ module SafetyKit
43
43
  # ignored by downstream processing. This method returns immediately after the
44
44
  # frame has been accepted for processing.
45
45
  #
46
- # @overload add_frame(namespace, image_data_uri:, stream_id:, timestamp:, frame_id: nil, request_options: {})
46
+ # @overload add_frame(namespace, image_data_uri:, stream_id:, timestamp:, frame_id: nil, metadata: nil, request_options: {})
47
47
  #
48
48
  # @param namespace [String] The namespace to ingest stream data into
49
49
  #
@@ -55,6 +55,8 @@ module SafetyKit
55
55
  #
56
56
  # @param frame_id [String]
57
57
  #
58
+ # @param metadata [Hash{Symbol=>Object, nil}] Arbitrary key-value metadata to associate with this frame, at most 8192 bytes wh
59
+ #
58
60
  # @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}, nil]
59
61
  #
60
62
  # @return [SafetyKit::Models::StreamAddFrameResponse]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SafetyKit
4
- VERSION = "0.49.0"
4
+ VERSION = "0.50.0"
5
5
  end
@@ -34,6 +34,15 @@ module SafetyKit
34
34
  sig { params(frame_id: String).void }
35
35
  attr_writer :frame_id
36
36
 
37
+ # Arbitrary key-value metadata to associate with this frame, at most 8192 bytes
38
+ # when serialized. If a violation is detected on this frame, the metadata is
39
+ # echoed back verbatim in the live_video.violation_detected webhook.
40
+ sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) }
41
+ attr_reader :metadata
42
+
43
+ sig { params(metadata: T::Hash[Symbol, T.nilable(T.anything)]).void }
44
+ attr_writer :metadata
45
+
37
46
  sig do
38
47
  params(
39
48
  namespace: String,
@@ -41,6 +50,7 @@ module SafetyKit
41
50
  stream_id: String,
42
51
  timestamp: Integer,
43
52
  frame_id: String,
53
+ metadata: T::Hash[Symbol, T.nilable(T.anything)],
44
54
  request_options: SafetyKit::RequestOptions::OrHash
45
55
  ).returns(T.attached_class)
46
56
  end
@@ -55,6 +65,10 @@ module SafetyKit
55
65
  stream_id:,
56
66
  timestamp:,
57
67
  frame_id: nil,
68
+ # Arbitrary key-value metadata to associate with this frame, at most 8192 bytes
69
+ # when serialized. If a violation is detected on this frame, the metadata is
70
+ # echoed back verbatim in the live_video.violation_detected webhook.
71
+ metadata: nil,
58
72
  request_options: {}
59
73
  )
60
74
  end
@@ -67,6 +81,7 @@ module SafetyKit
67
81
  stream_id: String,
68
82
  timestamp: Integer,
69
83
  frame_id: String,
84
+ metadata: T::Hash[Symbol, T.nilable(T.anything)],
70
85
  request_options: SafetyKit::RequestOptions
71
86
  }
72
87
  )
@@ -38,6 +38,7 @@ module SafetyKit
38
38
  stream_id: String,
39
39
  timestamp: Integer,
40
40
  frame_id: String,
41
+ metadata: T::Hash[Symbol, T.nilable(T.anything)],
41
42
  request_options: SafetyKit::RequestOptions::OrHash
42
43
  ).returns(SafetyKit::Models::StreamAddFrameResponse)
43
44
  end
@@ -52,6 +53,10 @@ module SafetyKit
52
53
  stream_id:,
53
54
  timestamp:,
54
55
  frame_id: nil,
56
+ # Arbitrary key-value metadata to associate with this frame, at most 8192 bytes
57
+ # when serialized. If a violation is detected on this frame, the metadata is
58
+ # echoed back verbatim in the live_video.violation_detected webhook.
59
+ metadata: nil,
55
60
  request_options: {}
56
61
  )
57
62
  end
@@ -6,7 +6,8 @@ module SafetyKit
6
6
  image_data_uri: String,
7
7
  stream_id: String,
8
8
  timestamp: Integer,
9
- frame_id: String
9
+ frame_id: String,
10
+ metadata: ::Hash[Symbol, top?]
10
11
  }
11
12
  & SafetyKit::Internal::Type::request_parameters
12
13
 
@@ -26,12 +27,17 @@ module SafetyKit
26
27
 
27
28
  def frame_id=: (String) -> String
28
29
 
30
+ attr_reader metadata: ::Hash[Symbol, top?]?
31
+
32
+ def metadata=: (::Hash[Symbol, top?]) -> ::Hash[Symbol, top?]
33
+
29
34
  def initialize: (
30
35
  namespace: String,
31
36
  image_data_uri: String,
32
37
  stream_id: String,
33
38
  timestamp: Integer,
34
39
  ?frame_id: String,
40
+ ?metadata: ::Hash[Symbol, top?],
35
41
  ?request_options: SafetyKit::request_opts
36
42
  ) -> void
37
43
 
@@ -41,6 +47,7 @@ module SafetyKit
41
47
  stream_id: String,
42
48
  timestamp: Integer,
43
49
  frame_id: String,
50
+ metadata: ::Hash[Symbol, top?],
44
51
  request_options: SafetyKit::RequestOptions
45
52
  }
46
53
  end
@@ -14,6 +14,7 @@ module SafetyKit
14
14
  stream_id: String,
15
15
  timestamp: Integer,
16
16
  ?frame_id: String,
17
+ ?metadata: ::Hash[Symbol, top?],
17
18
  ?request_options: SafetyKit::request_opts
18
19
  ) -> SafetyKit::Models::StreamAddFrameResponse
19
20
 
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.49.0
4
+ version: 0.50.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-07-31 00:00:00.000000000 Z
11
+ date: 2026-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi