safetykit 0.38.0 → 0.39.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: ff72ad728938a8307e681b9fde61aac54b0741a14909ce107a3a187e623f0b02
4
- data.tar.gz: c488cade87250091d245a2769b2cd724600800179a3461e02862b7f501a5c1f0
3
+ metadata.gz: 3fcd61946975537d341a136ab8eb52b129b2293da7c725323110fec14a667b54
4
+ data.tar.gz: 52376c4d26b8cc318beced8cb4c053c4bcb04c4047dd057ff348889d4e6a1c33
5
5
  SHA512:
6
- metadata.gz: 32f7d3c20edcc2662d3bfc88f5df8452cf1fe3fa40f95e78d7959dfc02deb806bde921c518e4de4270946db965ce79c5dc9fcb26aa452d71895f2684426ee1e8
7
- data.tar.gz: d7bb166f624757314bc6b11e74d6158685ca6f3132793e0c03ed06b96e6d9f9d3816fb63662355a6de18af0ebeb45b275ebe750a6943c115c62e32ca15a57535
6
+ metadata.gz: 4e2abc8cf197ce8262fb6ff58e9b3f5a23339693140d452e47361bd745d7cdf1377c84eef28cf6109f5adfa256703d012b51da71d21ccef232409fb4d8684ccd
7
+ data.tar.gz: a5ca5d701121d33402287714bfb1862bebb45a23ec9134a1e08b86449285dcb32163ba9808ee4d051c19ad29670a39b4a82c42887319e7363e8f313b834910ea
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.39.0 (2026-07-13)
4
+
5
+ Full Changelog: [v0.38.0...v0.39.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.38.0...v0.39.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([5d1e21b](https://github.com/GetSafetyKit/safetykit-ruby/commit/5d1e21b98d9b39fea750abca3356d53e27139f9a))
10
+
3
11
  ## 0.38.0 (2026-07-10)
4
12
 
5
13
  Full Changelog: [v0.37.0...v0.38.0](https://github.com/GetSafetyKit/safetykit-ruby/compare/v0.37.0...v0.38.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.38.0"
20
+ gem "safetykit", "~> 0.39.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -13,176 +13,10 @@ module SafetyKit
13
13
  # @return [String]
14
14
  required :namespace, String
15
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::DataCreateUploadURLParams::Schema}, nil]
23
- optional :schema, -> { SafetyKit::Internal::Type::HashOf[SafetyKit::DataCreateUploadURLParams::Schema] }
24
-
25
- # @!method initialize(namespace:, schema: nil, request_options: {})
26
- # Some parameter documentations has been truncated, see
27
- # {SafetyKit::Models::DataCreateUploadURLParams} for more details.
28
- #
16
+ # @!method initialize(namespace:, request_options: {})
29
17
  # @param namespace [String] The namespace to ingest data into
30
18
  #
31
- # @param schema [Hash{Symbol=>SafetyKit::Models::DataCreateUploadURLParams::Schema}] Schema mapping field names to their definitions. Use content_type to specify whi
32
- #
33
19
  # @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}]
34
-
35
- class Schema < SafetyKit::Internal::Type::BaseModel
36
- # @!attribute belongs_to
37
- # The parent object namespace this field belongs to, creating a parent-child
38
- # relationship with that namespace.
39
- #
40
- # @return [String, nil]
41
- optional :belongs_to, String
42
-
43
- # @!attribute content_type
44
- # The type of content (image_url, video_url, audio_url, website_url, datetime,
45
- # metadata, or card). When specified as a URL type, SafetyKit will process the
46
- # URL. Use 'metadata' for fields that should be stored but not indexed.
47
- #
48
- # @return [Symbol, SafetyKit::Models::DataCreateUploadURLParams::Schema::ContentType, nil]
49
- optional :content_type, enum: -> { SafetyKit::DataCreateUploadURLParams::Schema::ContentType }
50
-
51
- # @!attribute display_hint
52
- # Display hint for UI rendering of this field
53
- #
54
- # @return [SafetyKit::Models::DataCreateUploadURLParams::Schema::DisplayHint, nil]
55
- optional :display_hint, -> { SafetyKit::DataCreateUploadURLParams::Schema::DisplayHint }
56
-
57
- # @!attribute field_limit
58
- # Maximum amount of this field to include when sending to AI models. For text
59
- # fields, this is the character limit. For array fields (e.g. image URLs), this is
60
- # the maximum number of items.
61
- #
62
- # @return [Integer, nil]
63
- optional :field_limit, Integer
64
-
65
- # @!attribute ingest_as
66
- # Optional parser to apply before indexing this field.
67
- #
68
- # @return [Symbol, SafetyKit::Models::DataCreateUploadURLParams::Schema::IngestAs, nil]
69
- optional :ingest_as, enum: -> { SafetyKit::DataCreateUploadURLParams::Schema::IngestAs }
70
-
71
- # @!method initialize(belongs_to: nil, content_type: nil, display_hint: nil, field_limit: nil, ingest_as: nil)
72
- # Some parameter documentations has been truncated, see
73
- # {SafetyKit::Models::DataCreateUploadURLParams::Schema} for more details.
74
- #
75
- # Schema definition for a data field
76
- #
77
- # @param belongs_to [String] The parent object namespace this field belongs to, creating a parent-child relat
78
- #
79
- # @param content_type [Symbol, SafetyKit::Models::DataCreateUploadURLParams::Schema::ContentType] The type of content (image_url, video_url, audio_url, website_url, datetime, met
80
- #
81
- # @param display_hint [SafetyKit::Models::DataCreateUploadURLParams::Schema::DisplayHint] Display hint for UI rendering of this field
82
- #
83
- # @param field_limit [Integer] Maximum amount of this field to include when sending to AI models. For text fiel
84
- #
85
- # @param ingest_as [Symbol, SafetyKit::Models::DataCreateUploadURLParams::Schema::IngestAs] Optional parser to apply before indexing this field.
86
-
87
- # The type of content (image_url, video_url, audio_url, website_url, datetime,
88
- # metadata, or card). When specified as a URL type, SafetyKit will process the
89
- # URL. Use 'metadata' for fields that should be stored but not indexed.
90
- #
91
- # @see SafetyKit::Models::DataCreateUploadURLParams::Schema#content_type
92
- module ContentType
93
- extend SafetyKit::Internal::Type::Enum
94
-
95
- IMAGE_URL = :image_url
96
- VIDEO_URL = :video_url
97
- AUDIO_URL = :audio_url
98
- WEBSITE_URL = :website_url
99
- DATETIME = :datetime
100
- METADATA = :metadata
101
- CARD = :card
102
-
103
- # @!method self.values
104
- # @return [Array<Symbol>]
105
- end
106
-
107
- # @see SafetyKit::Models::DataCreateUploadURLParams::Schema#display_hint
108
- class DisplayHint < SafetyKit::Internal::Type::BaseModel
109
- # @!attribute hidden
110
- # Hide this field from default UI display.
111
- #
112
- # @return [Boolean, nil]
113
- optional :hidden, SafetyKit::Internal::Type::Boolean
114
-
115
- # @!attribute name
116
- # Display label to show for this field in the UI
117
- #
118
- # @return [String, nil]
119
- optional :name, String
120
-
121
- # @!attribute type
122
- # The display hint type
123
- #
124
- # @return [Symbol, SafetyKit::Models::DataCreateUploadURLParams::Schema::DisplayHint::Type, nil]
125
- optional :type, enum: -> { SafetyKit::DataCreateUploadURLParams::Schema::DisplayHint::Type }
126
-
127
- # @!method initialize(hidden: nil, name: nil, type: nil)
128
- # Display hint for UI rendering of this field
129
- #
130
- # @param hidden [Boolean] Hide this field from default UI display.
131
- #
132
- # @param name [String] Display label to show for this field in the UI
133
- #
134
- # @param type [Symbol, SafetyKit::Models::DataCreateUploadURLParams::Schema::DisplayHint::Type] The display hint type
135
-
136
- # The display hint type
137
- #
138
- # @see SafetyKit::Models::DataCreateUploadURLParams::Schema::DisplayHint#type
139
- module Type
140
- extend SafetyKit::Internal::Type::Enum
141
-
142
- TITLE = :title
143
- SUBTITLE = :subtitle
144
- CATEGORY = :category
145
- IDENTIFIER = :identifier
146
- CANONICAL_URL = :canonical_url
147
- STATUS = :status
148
- PRIMARY_TAG_SET = :primary_tag_set
149
- TAG_SET = :tag_set
150
- TIMESTAMP = :timestamp
151
- RATING = :rating
152
- SUMMARY = :summary
153
- PROFILE_IMAGE = :profile_image
154
- PRIMARY_IMAGE = :primary_image
155
- IMAGE_SET = :image_set
156
- VIDEO_SET = :video_set
157
- AUDIO_SET = :audio_set
158
- BODY = :body
159
- THREAD = :thread
160
- TWO_PERSON_CHAT = :two_person_chat
161
- MESSAGE = :message
162
- PROFILE = :profile
163
- MONEY = :money
164
- LOCATION = :location
165
- ATTRIBUTE_GROUP = :attribute_group
166
- ATTRIBUTE = :attribute
167
-
168
- # @!method self.values
169
- # @return [Array<Symbol>]
170
- end
171
- end
172
-
173
- # Optional parser to apply before indexing this field.
174
- #
175
- # @see SafetyKit::Models::DataCreateUploadURLParams::Schema#ingest_as
176
- module IngestAs
177
- extend SafetyKit::Internal::Type::Enum
178
-
179
- FLOAT = :float
180
- DATETIME = :datetime
181
-
182
- # @!method self.values
183
- # @return [Array<Symbol>]
184
- end
185
- end
186
20
  end
187
21
  end
188
22
  end
@@ -57,8 +57,6 @@ module SafetyKit
57
57
 
58
58
  DataObject = SafetyKit::Models::DataObject
59
59
 
60
- DataUpdateSettingsParams = SafetyKit::Models::DataUpdateSettingsParams
61
-
62
60
  DeletionRequestCreateParams = SafetyKit::Models::DeletionRequestCreateParams
63
61
 
64
62
  StreamAddFrameParams = SafetyKit::Models::StreamAddFrameParams
@@ -32,32 +32,25 @@ module SafetyKit
32
32
  )
33
33
  end
34
34
 
35
- # Some parameter documentations has been truncated, see
36
- # {SafetyKit::Models::DataCreateUploadURLParams} for more details.
37
- #
38
35
  # Request a pre-signed upload URL for large JSONL batches into a namespace. After
39
36
  # receiving `upload_url`, upload your JSONL file using `PUT {upload_url}` with
40
37
  # header `Content-Type: application/json`; put each JSON object on a new line.
41
38
  #
42
- # @overload create_upload_url(namespace, schema: nil, request_options: {})
39
+ # @overload create_upload_url(namespace, request_options: {})
43
40
  #
44
41
  # @param namespace [String] The namespace to ingest data into
45
42
  #
46
- # @param schema [Hash{Symbol=>SafetyKit::Models::DataCreateUploadURLParams::Schema}] Schema mapping field names to their definitions. Use content_type to specify whi
47
- #
48
43
  # @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}, nil]
49
44
  #
50
45
  # @return [SafetyKit::Models::DataCreateUploadURLResponse]
51
46
  #
52
47
  # @see SafetyKit::Models::DataCreateUploadURLParams
53
48
  def create_upload_url(namespace, params = {})
54
- parsed, options = SafetyKit::DataCreateUploadURLParams.dump_request(params)
55
49
  @client.request(
56
50
  method: :post,
57
51
  path: ["v1/data/%1$s/requests/upload-url", namespace],
58
- body: parsed,
59
52
  model: SafetyKit::Models::DataCreateUploadURLResponse,
60
- options: options
53
+ options: params[:request_options]
61
54
  )
62
55
  end
63
56
 
@@ -120,34 +113,6 @@ module SafetyKit
120
113
  )
121
114
  end
122
115
 
123
- # Some parameter documentations has been truncated, see
124
- # {SafetyKit::Models::DataUpdateSettingsParams} for more details.
125
- #
126
- # Create or replace settings for a namespace, primarily used to change the schema
127
- # associated with the namespace.
128
- #
129
- # @overload update_settings(namespace, schema:, request_options: {})
130
- #
131
- # @param namespace [String] The namespace to ingest data into
132
- #
133
- # @param schema [Hash{Symbol=>SafetyKit::Models::DataUpdateSettingsParams::Schema}] Schema mapping field names to their definitions. Use content_type to specify whi
134
- #
135
- # @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}, nil]
136
- #
137
- # @return [SafetyKit::Models::DataUpdateSettingsResponse]
138
- #
139
- # @see SafetyKit::Models::DataUpdateSettingsParams
140
- def update_settings(namespace, params)
141
- parsed, options = SafetyKit::DataUpdateSettingsParams.dump_request(params)
142
- @client.request(
143
- method: :put,
144
- path: ["v1/data/%1$s/settings", namespace],
145
- body: parsed,
146
- model: SafetyKit::Models::DataUpdateSettingsResponse,
147
- options: options
148
- )
149
- end
150
-
151
116
  # @api private
152
117
  #
153
118
  # @param client [SafetyKit::Client]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SafetyKit
4
- VERSION = "0.38.0"
4
+ VERSION = "0.39.0"
5
5
  end
data/lib/safety_kit.rb CHANGED
@@ -69,8 +69,6 @@ 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"
74
72
  require_relative "safety_kit/models/deletion_request_create_params"
75
73
  require_relative "safety_kit/models/deletion_request_create_response"
76
74
  require_relative "safety_kit/models/stream_add_frame_params"