safetykit 0.40.0 → 0.42.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: 974c6c63859d8e257e98c8ee22a18f74adabbb4111e4935830ce7e08d057f4e0
4
- data.tar.gz: 9ce20e4a121b18257fb18d9a597ab9fbb6ae0e060a8e487309ef0a4c78cdf008
3
+ metadata.gz: edffd2653865558912c56bead33b990ba0805681fa73149c4047b187b4cf2cbb
4
+ data.tar.gz: dbfc43c05caa3f8a9bb601bfee579a8a1979aa3ee3939fba2c588b7297ad65d7
5
5
  SHA512:
6
- metadata.gz: 38dabf8af87360cfce8fcd9fb6e0bf68144e92f9649afe6f6c7357c9e2acad331dd629f49215430ea3ed9843bd932e546b8794aaa75ff96153ba73884099508b
7
- data.tar.gz: 8c66df936f0b4cdd19999dcbe71ab9c2bf35adb03b94fe4bd59886a2ed3e9408c339c79ca29bd593b982df766de0cbfe8a84f0fc87683d7206c857e3b586bfb3
6
+ metadata.gz: 6d820ca8a1312d4e3a127252954bb95effb1a27e51aceb1d8a69b8a334d9e44f14fd250459c66994c142410b1979c418bb64afab93552df843084e035ded878c
7
+ data.tar.gz: 42e81a1984b01d3a91a522d1ea534356925de459c107df797c72ce65504f4ec60f9c47c3a12b2d26b604d0d6044148f63b53679ab79f8972883537b25b69fe4d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.42.0 (2026-07-18)
4
+
5
+ Full Changelog: [v0.41.0...v0.42.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.41.0...v0.42.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([19ed205](https://github.com/GetSafetyKit/safetykit-ruby/commit/19ed2054daafec6085e90b5be7420e025183207f))
10
+
11
+ ## 0.41.0 (2026-07-16)
12
+
13
+ Full Changelog: [v0.40.0...v0.41.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.40.0...v0.41.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([cc19fe4](https://github.com/GetSafetyKit/safetykit-ruby/commit/cc19fe4c0084d693c9657bb4e2a6ebc721689abd))
18
+
3
19
  ## 0.40.0 (2026-07-15)
4
20
 
5
21
  Full Changelog: [v0.39.0...v0.40.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.39.0...v0.40.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.40.0"
20
+ gem "safetykit", "~> 0.42.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -0,0 +1,200 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SafetyKit
4
+ module Models
5
+ # @see SafetyKit::Resources::Data#update_settings
6
+ class DataUpdateSettingsParams < SafetyKit::Internal::Type::BaseModel
7
+ extend SafetyKit::Internal::Type::RequestParameters::Converter
8
+ include SafetyKit::Internal::Type::RequestParameters
9
+
10
+ # @!attribute namespace
11
+ # The namespace to ingest data into
12
+ #
13
+ # @return [String]
14
+ required :namespace, String
15
+
16
+ # @!attribute schema
17
+ # Schema mapping field names to their definitions. Use content_type to specify
18
+ # which fields contain URLs that should be processed (images, videos, or
19
+ # websites), datetime fields, or 'metadata' for fields that should be stored but
20
+ # not indexed. Use display_hint to provide UI rendering hints.
21
+ #
22
+ # @return [Hash{Symbol=>SafetyKit::Models::DataUpdateSettingsParams::Schema}, nil]
23
+ optional :schema, -> { SafetyKit::Internal::Type::HashOf[SafetyKit::DataUpdateSettingsParams::Schema] }
24
+
25
+ # @!attribute settings
26
+ # Namespace settings to store, replacing existing settings. Omit to leave existing
27
+ # settings unchanged. Configure these values with guidance from SafetyKit.
28
+ #
29
+ # @return [Hash{Symbol=>Object, nil}, nil]
30
+ optional :settings, SafetyKit::Internal::Type::HashOf[SafetyKit::Internal::Type::Unknown, nil?: true]
31
+
32
+ # @!method initialize(namespace:, schema: nil, settings: nil, request_options: {})
33
+ # Some parameter documentations has been truncated, see
34
+ # {SafetyKit::Models::DataUpdateSettingsParams} for more details.
35
+ #
36
+ # @param namespace [String] The namespace to ingest data into
37
+ #
38
+ # @param schema [Hash{Symbol=>SafetyKit::Models::DataUpdateSettingsParams::Schema}] Schema mapping field names to their definitions. Use content_type to specify whi
39
+ #
40
+ # @param settings [Hash{Symbol=>Object, nil}] Namespace settings to store, replacing existing settings. Omit to leave existing
41
+ #
42
+ # @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}]
43
+
44
+ class Schema < SafetyKit::Internal::Type::BaseModel
45
+ # @!attribute belongs_to
46
+ # The parent object namespace this field belongs to, creating a parent-child
47
+ # relationship with that namespace.
48
+ #
49
+ # @return [String, nil]
50
+ optional :belongs_to, String
51
+
52
+ # @!attribute content_type
53
+ # The type of content (image_url, video_url, audio_url, website_url, datetime,
54
+ # metadata, markdown, or html). When specified as a URL type, SafetyKit will
55
+ # process the URL. Use 'metadata' for fields that should be stored but not
56
+ # indexed, and 'markdown' or 'html' for rich text.
57
+ #
58
+ # @return [Symbol, SafetyKit::Models::DataUpdateSettingsParams::Schema::ContentType, nil]
59
+ optional :content_type, enum: -> { SafetyKit::DataUpdateSettingsParams::Schema::ContentType }
60
+
61
+ # @!attribute display_hint
62
+ # Display hint for UI rendering of this field
63
+ #
64
+ # @return [SafetyKit::Models::DataUpdateSettingsParams::Schema::DisplayHint, nil]
65
+ optional :display_hint, -> { SafetyKit::DataUpdateSettingsParams::Schema::DisplayHint }
66
+
67
+ # @!attribute field_limit
68
+ # Maximum amount of this field to include when sending to AI models. For text
69
+ # fields, this is the character limit. For array fields (e.g. image URLs), this is
70
+ # the maximum number of items.
71
+ #
72
+ # @return [Integer, nil]
73
+ optional :field_limit, Integer
74
+
75
+ # @!attribute ingest_as
76
+ # Optional parser to apply before indexing this field.
77
+ #
78
+ # @return [Symbol, SafetyKit::Models::DataUpdateSettingsParams::Schema::IngestAs, nil]
79
+ optional :ingest_as, enum: -> { SafetyKit::DataUpdateSettingsParams::Schema::IngestAs }
80
+
81
+ # @!method initialize(belongs_to: nil, content_type: nil, display_hint: nil, field_limit: nil, ingest_as: nil)
82
+ # Some parameter documentations has been truncated, see
83
+ # {SafetyKit::Models::DataUpdateSettingsParams::Schema} for more details.
84
+ #
85
+ # Schema definition for a data field
86
+ #
87
+ # @param belongs_to [String] The parent object namespace this field belongs to, creating a parent-child relat
88
+ #
89
+ # @param content_type [Symbol, SafetyKit::Models::DataUpdateSettingsParams::Schema::ContentType] The type of content (image_url, video_url, audio_url, website_url, datetime, met
90
+ #
91
+ # @param display_hint [SafetyKit::Models::DataUpdateSettingsParams::Schema::DisplayHint] Display hint for UI rendering of this field
92
+ #
93
+ # @param field_limit [Integer] Maximum amount of this field to include when sending to AI models. For text fiel
94
+ #
95
+ # @param ingest_as [Symbol, SafetyKit::Models::DataUpdateSettingsParams::Schema::IngestAs] Optional parser to apply before indexing this field.
96
+
97
+ # The type of content (image_url, video_url, audio_url, website_url, datetime,
98
+ # metadata, markdown, or html). When specified as a URL type, SafetyKit will
99
+ # process the URL. Use 'metadata' for fields that should be stored but not
100
+ # indexed, and 'markdown' or 'html' for rich text.
101
+ #
102
+ # @see SafetyKit::Models::DataUpdateSettingsParams::Schema#content_type
103
+ module ContentType
104
+ extend SafetyKit::Internal::Type::Enum
105
+
106
+ IMAGE_URL = :image_url
107
+ VIDEO_URL = :video_url
108
+ AUDIO_URL = :audio_url
109
+ WEBSITE_URL = :website_url
110
+ DATETIME = :datetime
111
+ METADATA = :metadata
112
+ MARKDOWN = :markdown
113
+ HTML = :html
114
+
115
+ # @!method self.values
116
+ # @return [Array<Symbol>]
117
+ end
118
+
119
+ # @see SafetyKit::Models::DataUpdateSettingsParams::Schema#display_hint
120
+ class DisplayHint < SafetyKit::Internal::Type::BaseModel
121
+ # @!attribute hidden
122
+ # Hide this field from default UI display.
123
+ #
124
+ # @return [Boolean, nil]
125
+ optional :hidden, SafetyKit::Internal::Type::Boolean
126
+
127
+ # @!attribute name
128
+ # Display label to show for this field in the UI
129
+ #
130
+ # @return [String, nil]
131
+ optional :name, String
132
+
133
+ # @!attribute type
134
+ # The display hint type
135
+ #
136
+ # @return [Symbol, SafetyKit::Models::DataUpdateSettingsParams::Schema::DisplayHint::Type, nil]
137
+ optional :type, enum: -> { SafetyKit::DataUpdateSettingsParams::Schema::DisplayHint::Type }
138
+
139
+ # @!method initialize(hidden: nil, name: nil, type: nil)
140
+ # Display hint for UI rendering of this field
141
+ #
142
+ # @param hidden [Boolean] Hide this field from default UI display.
143
+ #
144
+ # @param name [String] Display label to show for this field in the UI
145
+ #
146
+ # @param type [Symbol, SafetyKit::Models::DataUpdateSettingsParams::Schema::DisplayHint::Type] The display hint type
147
+
148
+ # The display hint type
149
+ #
150
+ # @see SafetyKit::Models::DataUpdateSettingsParams::Schema::DisplayHint#type
151
+ module Type
152
+ extend SafetyKit::Internal::Type::Enum
153
+
154
+ TITLE = :title
155
+ SUBTITLE = :subtitle
156
+ CATEGORY = :category
157
+ IDENTIFIER = :identifier
158
+ CANONICAL_URL = :canonical_url
159
+ STATUS = :status
160
+ PRIMARY_TAG_SET = :primary_tag_set
161
+ TAG_SET = :tag_set
162
+ TIMESTAMP = :timestamp
163
+ RATING = :rating
164
+ SUMMARY = :summary
165
+ PROFILE_IMAGE = :profile_image
166
+ PRIMARY_IMAGE = :primary_image
167
+ IMAGE_SET = :image_set
168
+ VIDEO_SET = :video_set
169
+ AUDIO_SET = :audio_set
170
+ BODY = :body
171
+ THREAD = :thread
172
+ TWO_PERSON_CHAT = :two_person_chat
173
+ MESSAGE = :message
174
+ PROFILE = :profile
175
+ MONEY = :money
176
+ LOCATION = :location
177
+ ATTRIBUTE_GROUP = :attribute_group
178
+ ATTRIBUTE = :attribute
179
+
180
+ # @!method self.values
181
+ # @return [Array<Symbol>]
182
+ end
183
+ end
184
+
185
+ # Optional parser to apply before indexing this field.
186
+ #
187
+ # @see SafetyKit::Models::DataUpdateSettingsParams::Schema#ingest_as
188
+ module IngestAs
189
+ extend SafetyKit::Internal::Type::Enum
190
+
191
+ FLOAT = :float
192
+ DATETIME = :datetime
193
+
194
+ # @!method self.values
195
+ # @return [Array<Symbol>]
196
+ end
197
+ end
198
+ end
199
+ end
200
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SafetyKit
4
+ module Models
5
+ # @see SafetyKit::Resources::Data#update_settings
6
+ class DataUpdateSettingsResponse < SafetyKit::Internal::Type::BaseModel
7
+ # @!attribute namespace
8
+ #
9
+ # @return [String]
10
+ required :namespace, String
11
+
12
+ # @!attribute status
13
+ #
14
+ # @return [Symbol, SafetyKit::Models::DataUpdateSettingsResponse::Status]
15
+ required :status, enum: -> { SafetyKit::Models::DataUpdateSettingsResponse::Status }
16
+
17
+ # @!method initialize(namespace:, status:)
18
+ # Namespace configuration was stored.
19
+ #
20
+ # @param namespace [String]
21
+ # @param status [Symbol, SafetyKit::Models::DataUpdateSettingsResponse::Status]
22
+
23
+ # @see SafetyKit::Models::DataUpdateSettingsResponse#status
24
+ module Status
25
+ extend SafetyKit::Internal::Type::Enum
26
+
27
+ UPDATED = :updated
28
+
29
+ # @!method self.values
30
+ # @return [Array<Symbol>]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -57,6 +57,8 @@ module SafetyKit
57
57
 
58
58
  DataObject = SafetyKit::Models::DataObject
59
59
 
60
+ DataUpdateSettingsParams = SafetyKit::Models::DataUpdateSettingsParams
61
+
60
62
  DeletionRequestCreateParams = SafetyKit::Models::DeletionRequestCreateParams
61
63
 
62
64
  StreamAddFrameParams = SafetyKit::Models::StreamAddFrameParams
@@ -11,7 +11,12 @@ module SafetyKit
11
11
  # Beta. Queue backend events for asynchronous ingestion. This endpoint accepts the
12
12
  # same request body as POST /v1/events, writes one SQS message per event, and
13
13
  # returns after the events are queued. SafetyKit later processes the queued events
14
- # through the standard event ingestion path.
14
+ # through the standard event ingestion path. Event strings support tab (U+0009),
15
+ # line feed (U+000A), carriage return (U+000D), and characters in the ranges
16
+ # U+0020–U+D7FF, U+E000–U+FFFD, and U+10000–U+10FFFF. The endpoint strips all
17
+ # other code points before queueing the event; clients should sanitize them before
18
+ # sending because they are unsupported and can cause errors in other ingestion
19
+ # paths.
15
20
  #
16
21
  # @overload create_async(body:, request_options: {})
17
22
  #
@@ -113,6 +113,37 @@ module SafetyKit
113
113
  )
114
114
  end
115
115
 
116
+ # Some parameter documentations has been truncated, see
117
+ # {SafetyKit::Models::DataUpdateSettingsParams} for more details.
118
+ #
119
+ # Update the schema and/or settings for a namespace. Only the fields provided are
120
+ # updated; omitted fields are left unchanged. Namespaces whose configuration is
121
+ # managed by SafetyKit cannot be updated through this endpoint.
122
+ #
123
+ # @overload update_settings(namespace, schema: nil, settings: nil, request_options: {})
124
+ #
125
+ # @param namespace [String] The namespace to ingest data into
126
+ #
127
+ # @param schema [Hash{Symbol=>SafetyKit::Models::DataUpdateSettingsParams::Schema}] Schema mapping field names to their definitions. Use content_type to specify whi
128
+ #
129
+ # @param settings [Hash{Symbol=>Object, nil}] Namespace settings to store, replacing existing settings. Omit to leave existing
130
+ #
131
+ # @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}, nil]
132
+ #
133
+ # @return [SafetyKit::Models::DataUpdateSettingsResponse]
134
+ #
135
+ # @see SafetyKit::Models::DataUpdateSettingsParams
136
+ def update_settings(namespace, params = {})
137
+ parsed, options = SafetyKit::DataUpdateSettingsParams.dump_request(params)
138
+ @client.request(
139
+ method: :put,
140
+ path: ["v1/data/%1$s/settings", namespace],
141
+ body: parsed,
142
+ model: SafetyKit::Models::DataUpdateSettingsResponse,
143
+ options: options
144
+ )
145
+ end
146
+
116
147
  # @api private
117
148
  #
118
149
  # @param client [SafetyKit::Client]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SafetyKit
4
- VERSION = "0.40.0"
4
+ VERSION = "0.42.0"
5
5
  end
data/lib/safety_kit.rb CHANGED
@@ -69,6 +69,8 @@ require_relative "safety_kit/models/data_get_download_url_response"
69
69
  require_relative "safety_kit/models/data_get_status_params"
70
70
  require_relative "safety_kit/models/data_get_status_response"
71
71
  require_relative "safety_kit/models/data_object"
72
+ require_relative "safety_kit/models/data_update_settings_params"
73
+ require_relative "safety_kit/models/data_update_settings_response"
72
74
  require_relative "safety_kit/models/deletion_request_create_params"
73
75
  require_relative "safety_kit/models/deletion_request_create_response"
74
76
  require_relative "safety_kit/models/stream_add_frame_params"