From c8b16466f4d3c51e4aee14d34fc823e51bd949c4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 07:58:41 +0000 Subject: [PATCH 1/3] fix: multipart encoding for file arrays --- lib/openlayer/internal/util.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/openlayer/internal/util.rb b/lib/openlayer/internal/util.rb index b603e57..53fe8be 100644 --- a/lib/openlayer/internal/util.rb +++ b/lib/openlayer/internal/util.rb @@ -610,6 +610,7 @@ def encode_query_params(query) # # @return [Array(String, Enumerable)] private def encode_multipart_streaming(body) + # rubocop:disable Style/CaseEquality # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length boundary = SecureRandom.urlsafe_base64(46) @@ -619,7 +620,7 @@ def encode_query_params(query) in Hash body.each do |key, val| case val - in Array if val.all? { primitive?(_1) } + in Array if val.all? { primitive?(_1) || Openlayer::Internal::Type::FileInput === _1 } val.each do |v| write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing) end @@ -635,6 +636,7 @@ def encode_query_params(query) fused_io = fused_enum(strio) { closing.each(&:call) } [boundary, fused_io] + # rubocop:enable Style/CaseEquality end # @api private From 232488ec3989f0233017e289973125c5d489f247 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:44:47 +0000 Subject: [PATCH 2/3] docs(closes OPEN-9953): expose endpoints to get and delete a row --- .stats.yml | 6 +- lib/openlayer.rb | 3 + .../inference_pipelines/row_delete_params.rb | 28 ++++++++++ .../row_retrieve_params.rb | 28 ++++++++++ .../row_retrieve_response.rb | 24 ++++++++ .../resources/inference_pipelines/rows.rb | 55 +++++++++++++++++++ .../inference_pipelines/row_delete_params.rbi | 48 ++++++++++++++++ .../row_retrieve_params.rbi | 48 ++++++++++++++++ .../row_retrieve_response.rbi | 39 +++++++++++++ .../resources/inference_pipelines/rows.rbi | 33 +++++++++++ .../inference_pipelines/row_delete_params.rbs | 30 ++++++++++ .../row_retrieve_params.rbs | 30 ++++++++++ .../row_retrieve_response.rbs | 21 +++++++ .../resources/inference_pipelines/rows.rbs | 12 ++++ .../inference_pipelines/rows_test.rb | 31 +++++++++++ 15 files changed, 433 insertions(+), 3 deletions(-) create mode 100644 lib/openlayer/models/inference_pipelines/row_delete_params.rb create mode 100644 lib/openlayer/models/inference_pipelines/row_retrieve_params.rb create mode 100644 lib/openlayer/models/inference_pipelines/row_retrieve_response.rb create mode 100644 rbi/openlayer/models/inference_pipelines/row_delete_params.rbi create mode 100644 rbi/openlayer/models/inference_pipelines/row_retrieve_params.rbi create mode 100644 rbi/openlayer/models/inference_pipelines/row_retrieve_response.rbi create mode 100644 sig/openlayer/models/inference_pipelines/row_delete_params.rbs create mode 100644 sig/openlayer/models/inference_pipelines/row_retrieve_params.rbs create mode 100644 sig/openlayer/models/inference_pipelines/row_retrieve_response.rbs diff --git a/.stats.yml b/.stats.yml index 9f47e6b..ae97cfa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,3 +1,3 @@ -configured_endpoints: 29 -openapi_spec_hash: 20caa671b1b1a87c0a5cb6ebd7e4b064 -config_hash: aaf12ae1da71c62ca5195fc2b66f657c +configured_endpoints: 31 +openapi_spec_hash: a574ef9082e992c25120554886a9ab7a +config_hash: f8fb410519268f9f228074c9344acc1f diff --git a/lib/openlayer.rb b/lib/openlayer.rb index fe577ce..e0c8f43 100644 --- a/lib/openlayer.rb +++ b/lib/openlayer.rb @@ -65,8 +65,11 @@ require_relative "openlayer/models/inference_pipeline_retrieve_users_response" require_relative "openlayer/models/inference_pipelines/data_stream_params" require_relative "openlayer/models/inference_pipelines/data_stream_response" +require_relative "openlayer/models/inference_pipelines/row_delete_params" require_relative "openlayer/models/inference_pipelines/row_list_params" require_relative "openlayer/models/inference_pipelines/row_list_response" +require_relative "openlayer/models/inference_pipelines/row_retrieve_params" +require_relative "openlayer/models/inference_pipelines/row_retrieve_response" require_relative "openlayer/models/inference_pipelines/row_update_params" require_relative "openlayer/models/inference_pipelines/row_update_response" require_relative "openlayer/models/inference_pipelines/test_result_list_params" diff --git a/lib/openlayer/models/inference_pipelines/row_delete_params.rb b/lib/openlayer/models/inference_pipelines/row_delete_params.rb new file mode 100644 index 0000000..21c7d0b --- /dev/null +++ b/lib/openlayer/models/inference_pipelines/row_delete_params.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module Openlayer + module Models + module InferencePipelines + # @see Openlayer::Resources::InferencePipelines::Rows#delete + class RowDeleteParams < Openlayer::Internal::Type::BaseModel + extend Openlayer::Internal::Type::RequestParameters::Converter + include Openlayer::Internal::Type::RequestParameters + + # @!attribute inference_pipeline_id + # + # @return [String] + required :inference_pipeline_id, String + + # @!attribute inference_id + # + # @return [String] + required :inference_id, String + + # @!method initialize(inference_pipeline_id:, inference_id:, request_options: {}) + # @param inference_pipeline_id [String] + # @param inference_id [String] + # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/openlayer/models/inference_pipelines/row_retrieve_params.rb b/lib/openlayer/models/inference_pipelines/row_retrieve_params.rb new file mode 100644 index 0000000..333fa27 --- /dev/null +++ b/lib/openlayer/models/inference_pipelines/row_retrieve_params.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module Openlayer + module Models + module InferencePipelines + # @see Openlayer::Resources::InferencePipelines::Rows#retrieve + class RowRetrieveParams < Openlayer::Internal::Type::BaseModel + extend Openlayer::Internal::Type::RequestParameters::Converter + include Openlayer::Internal::Type::RequestParameters + + # @!attribute inference_pipeline_id + # + # @return [String] + required :inference_pipeline_id, String + + # @!attribute inference_id + # + # @return [String] + required :inference_id, String + + # @!method initialize(inference_pipeline_id:, inference_id:, request_options: {}) + # @param inference_pipeline_id [String] + # @param inference_id [String] + # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/openlayer/models/inference_pipelines/row_retrieve_response.rb b/lib/openlayer/models/inference_pipelines/row_retrieve_response.rb new file mode 100644 index 0000000..6b8e088 --- /dev/null +++ b/lib/openlayer/models/inference_pipelines/row_retrieve_response.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +module Openlayer + module Models + module InferencePipelines + # @see Openlayer::Resources::InferencePipelines::Rows#retrieve + class RowRetrieveResponse < Openlayer::Internal::Type::BaseModel + # @!attribute row + # + # @return [Object, nil] + optional :row, Openlayer::Internal::Type::Unknown + + # @!attribute success + # + # @return [Boolean, nil] + optional :success, Openlayer::Internal::Type::Boolean + + # @!method initialize(row: nil, success: nil) + # @param row [Object] + # @param success [Boolean] + end + end + end +end diff --git a/lib/openlayer/resources/inference_pipelines/rows.rb b/lib/openlayer/resources/inference_pipelines/rows.rb index 63a4c7a..00407b9 100644 --- a/lib/openlayer/resources/inference_pipelines/rows.rb +++ b/lib/openlayer/resources/inference_pipelines/rows.rb @@ -4,6 +4,33 @@ module Openlayer module Resources class InferencePipelines class Rows + # Fetch a single inference pipeline row by inference ID, including OTel steps. + # + # @overload retrieve(inference_id, inference_pipeline_id:, request_options: {}) + # + # @param inference_id [String] + # + # @param inference_pipeline_id [String] The inference pipeline id (a UUID). + # + # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Openlayer::Models::InferencePipelines::RowRetrieveResponse] + # + # @see Openlayer::Models::InferencePipelines::RowRetrieveParams + def retrieve(inference_id, params) + parsed, options = Openlayer::InferencePipelines::RowRetrieveParams.dump_request(params) + inference_pipeline_id = + parsed.delete(:inference_pipeline_id) do + raise ArgumentError.new("missing required path argument #{_1}") + end + @client.request( + method: :get, + path: ["inference-pipelines/%1$s/rows/%2$s", inference_pipeline_id, inference_id], + model: Openlayer::Models::InferencePipelines::RowRetrieveResponse, + options: options + ) + end + # Update an inference data point in an inference pipeline. # # @overload update(inference_pipeline_id, inference_id:, row:, config: nil, request_options: {}) @@ -82,6 +109,34 @@ def list(inference_pipeline_id, params = {}) ) end + # Delete a single inference pipeline row by inference ID. Only project admins can + # perform this action. + # + # @overload delete(inference_id, inference_pipeline_id:, request_options: {}) + # + # @param inference_id [String] + # + # @param inference_pipeline_id [String] The inference pipeline id (a UUID). + # + # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [nil] + # + # @see Openlayer::Models::InferencePipelines::RowDeleteParams + def delete(inference_id, params) + parsed, options = Openlayer::InferencePipelines::RowDeleteParams.dump_request(params) + inference_pipeline_id = + parsed.delete(:inference_pipeline_id) do + raise ArgumentError.new("missing required path argument #{_1}") + end + @client.request( + method: :delete, + path: ["inference-pipelines/%1$s/rows/%2$s", inference_pipeline_id, inference_id], + model: NilClass, + options: options + ) + end + # @api private # # @param client [Openlayer::Client] diff --git a/rbi/openlayer/models/inference_pipelines/row_delete_params.rbi b/rbi/openlayer/models/inference_pipelines/row_delete_params.rbi new file mode 100644 index 0000000..1bec742 --- /dev/null +++ b/rbi/openlayer/models/inference_pipelines/row_delete_params.rbi @@ -0,0 +1,48 @@ +# typed: strong + +module Openlayer + module Models + module InferencePipelines + class RowDeleteParams < Openlayer::Internal::Type::BaseModel + extend Openlayer::Internal::Type::RequestParameters::Converter + include Openlayer::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Openlayer::InferencePipelines::RowDeleteParams, + Openlayer::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :inference_pipeline_id + + sig { returns(String) } + attr_accessor :inference_id + + sig do + params( + inference_pipeline_id: String, + inference_id: String, + request_options: Openlayer::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(inference_pipeline_id:, inference_id:, request_options: {}) + end + + sig do + override.returns( + { + inference_pipeline_id: String, + inference_id: String, + request_options: Openlayer::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/openlayer/models/inference_pipelines/row_retrieve_params.rbi b/rbi/openlayer/models/inference_pipelines/row_retrieve_params.rbi new file mode 100644 index 0000000..ed62fd6 --- /dev/null +++ b/rbi/openlayer/models/inference_pipelines/row_retrieve_params.rbi @@ -0,0 +1,48 @@ +# typed: strong + +module Openlayer + module Models + module InferencePipelines + class RowRetrieveParams < Openlayer::Internal::Type::BaseModel + extend Openlayer::Internal::Type::RequestParameters::Converter + include Openlayer::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Openlayer::InferencePipelines::RowRetrieveParams, + Openlayer::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :inference_pipeline_id + + sig { returns(String) } + attr_accessor :inference_id + + sig do + params( + inference_pipeline_id: String, + inference_id: String, + request_options: Openlayer::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(inference_pipeline_id:, inference_id:, request_options: {}) + end + + sig do + override.returns( + { + inference_pipeline_id: String, + inference_id: String, + request_options: Openlayer::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/openlayer/models/inference_pipelines/row_retrieve_response.rbi b/rbi/openlayer/models/inference_pipelines/row_retrieve_response.rbi new file mode 100644 index 0000000..055a2bc --- /dev/null +++ b/rbi/openlayer/models/inference_pipelines/row_retrieve_response.rbi @@ -0,0 +1,39 @@ +# typed: strong + +module Openlayer + module Models + module InferencePipelines + class RowRetrieveResponse < Openlayer::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Openlayer::Models::InferencePipelines::RowRetrieveResponse, + Openlayer::Internal::AnyHash + ) + end + + sig { returns(T.nilable(T.anything)) } + attr_reader :row + + sig { params(row: T.anything).void } + attr_writer :row + + sig { returns(T.nilable(T::Boolean)) } + attr_reader :success + + sig { params(success: T::Boolean).void } + attr_writer :success + + sig do + params(row: T.anything, success: T::Boolean).returns(T.attached_class) + end + def self.new(row: nil, success: nil) + end + + sig { override.returns({ row: T.anything, success: T::Boolean }) } + def to_hash + end + end + end + end +end diff --git a/rbi/openlayer/resources/inference_pipelines/rows.rbi b/rbi/openlayer/resources/inference_pipelines/rows.rbi index 4768673..5926b57 100644 --- a/rbi/openlayer/resources/inference_pipelines/rows.rbi +++ b/rbi/openlayer/resources/inference_pipelines/rows.rbi @@ -4,6 +4,22 @@ module Openlayer module Resources class InferencePipelines class Rows + # Fetch a single inference pipeline row by inference ID, including OTel steps. + sig do + params( + inference_id: String, + inference_pipeline_id: String, + request_options: Openlayer::RequestOptions::OrHash + ).returns(Openlayer::Models::InferencePipelines::RowRetrieveResponse) + end + def retrieve( + inference_id, + # The inference pipeline id (a UUID). + inference_pipeline_id:, + request_options: {} + ) + end + # Update an inference data point in an inference pipeline. sig do params( @@ -86,6 +102,23 @@ module Openlayer ) end + # Delete a single inference pipeline row by inference ID. Only project admins can + # perform this action. + sig do + params( + inference_id: String, + inference_pipeline_id: String, + request_options: Openlayer::RequestOptions::OrHash + ).void + end + def delete( + inference_id, + # The inference pipeline id (a UUID). + inference_pipeline_id:, + request_options: {} + ) + end + # @api private sig { params(client: Openlayer::Client).returns(T.attached_class) } def self.new(client:) diff --git a/sig/openlayer/models/inference_pipelines/row_delete_params.rbs b/sig/openlayer/models/inference_pipelines/row_delete_params.rbs new file mode 100644 index 0000000..9ca6be6 --- /dev/null +++ b/sig/openlayer/models/inference_pipelines/row_delete_params.rbs @@ -0,0 +1,30 @@ +module Openlayer + module Models + module InferencePipelines + type row_delete_params = + { inference_pipeline_id: String, inference_id: String } + & Openlayer::Internal::Type::request_parameters + + class RowDeleteParams < Openlayer::Internal::Type::BaseModel + extend Openlayer::Internal::Type::RequestParameters::Converter + include Openlayer::Internal::Type::RequestParameters + + attr_accessor inference_pipeline_id: String + + attr_accessor inference_id: String + + def initialize: ( + inference_pipeline_id: String, + inference_id: String, + ?request_options: Openlayer::request_opts + ) -> void + + def to_hash: -> { + inference_pipeline_id: String, + inference_id: String, + request_options: Openlayer::RequestOptions + } + end + end + end +end diff --git a/sig/openlayer/models/inference_pipelines/row_retrieve_params.rbs b/sig/openlayer/models/inference_pipelines/row_retrieve_params.rbs new file mode 100644 index 0000000..aae4280 --- /dev/null +++ b/sig/openlayer/models/inference_pipelines/row_retrieve_params.rbs @@ -0,0 +1,30 @@ +module Openlayer + module Models + module InferencePipelines + type row_retrieve_params = + { inference_pipeline_id: String, inference_id: String } + & Openlayer::Internal::Type::request_parameters + + class RowRetrieveParams < Openlayer::Internal::Type::BaseModel + extend Openlayer::Internal::Type::RequestParameters::Converter + include Openlayer::Internal::Type::RequestParameters + + attr_accessor inference_pipeline_id: String + + attr_accessor inference_id: String + + def initialize: ( + inference_pipeline_id: String, + inference_id: String, + ?request_options: Openlayer::request_opts + ) -> void + + def to_hash: -> { + inference_pipeline_id: String, + inference_id: String, + request_options: Openlayer::RequestOptions + } + end + end + end +end diff --git a/sig/openlayer/models/inference_pipelines/row_retrieve_response.rbs b/sig/openlayer/models/inference_pipelines/row_retrieve_response.rbs new file mode 100644 index 0000000..7e75488 --- /dev/null +++ b/sig/openlayer/models/inference_pipelines/row_retrieve_response.rbs @@ -0,0 +1,21 @@ +module Openlayer + module Models + module InferencePipelines + type row_retrieve_response = { row: top, success: bool } + + class RowRetrieveResponse < Openlayer::Internal::Type::BaseModel + attr_reader row: top? + + def row=: (top) -> top + + attr_reader success: bool? + + def success=: (bool) -> bool + + def initialize: (?row: top, ?success: bool) -> void + + def to_hash: -> { row: top, success: bool } + end + end + end +end diff --git a/sig/openlayer/resources/inference_pipelines/rows.rbs b/sig/openlayer/resources/inference_pipelines/rows.rbs index 519a667..c42abde 100644 --- a/sig/openlayer/resources/inference_pipelines/rows.rbs +++ b/sig/openlayer/resources/inference_pipelines/rows.rbs @@ -2,6 +2,12 @@ module Openlayer module Resources class InferencePipelines class Rows + def retrieve: ( + String inference_id, + inference_pipeline_id: String, + ?request_options: Openlayer::request_opts + ) -> Openlayer::Models::InferencePipelines::RowRetrieveResponse + def update: ( String inference_pipeline_id, inference_id: String, @@ -26,6 +32,12 @@ module Openlayer ?request_options: Openlayer::request_opts ) -> Openlayer::Models::InferencePipelines::RowListResponse + def delete: ( + String inference_id, + inference_pipeline_id: String, + ?request_options: Openlayer::request_opts + ) -> nil + def initialize: (client: Openlayer::Client) -> void end end diff --git a/test/openlayer/resources/inference_pipelines/rows_test.rb b/test/openlayer/resources/inference_pipelines/rows_test.rb index 6867322..2e99f71 100644 --- a/test/openlayer/resources/inference_pipelines/rows_test.rb +++ b/test/openlayer/resources/inference_pipelines/rows_test.rb @@ -3,6 +3,25 @@ require_relative "../../test_helper" class Openlayer::Test::Resources::InferencePipelines::RowsTest < Openlayer::Test::ResourceTest + def test_retrieve_required_params + response = + @openlayer.inference_pipelines.rows.retrieve( + "inferenceId", + inference_pipeline_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" + ) + + assert_pattern do + response => Openlayer::Models::InferencePipelines::RowRetrieveResponse + end + + assert_pattern do + response => { + row: Openlayer::Internal::Type::Unknown | nil, + success: Openlayer::Internal::Type::Boolean | nil + } + end + end + def test_update_required_params response = @openlayer.inference_pipelines.rows.update( @@ -35,4 +54,16 @@ def test_list } end end + + def test_delete_required_params + response = + @openlayer.inference_pipelines.rows.delete( + "inferenceId", + inference_pipeline_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" + ) + + assert_pattern do + response => nil + end + end end From f12859355a89624fd93f65eb880e695b6c1d4013 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:45:07 +0000 Subject: [PATCH 3/3] release: 0.12.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/openlayer/version.rb | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a713055..9d5158b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.12.0" + ".": "0.12.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b7fb07d..cc86b5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.12.1 (2026-04-10) + +Full Changelog: [v0.12.0...v0.12.1](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.12.0...v0.12.1) + +### Bug Fixes + +* multipart encoding for file arrays ([c8b1646](https://github.com/openlayer-ai/openlayer-ruby/commit/c8b16466f4d3c51e4aee14d34fc823e51bd949c4)) + + +### Documentation + +* **closes OPEN-9953:** expose endpoints to get and delete a row ([232488e](https://github.com/openlayer-ai/openlayer-ruby/commit/232488ec3989f0233017e289973125c5d489f247)) + ## 0.12.0 (2026-04-01) Full Changelog: [v0.11.2...v0.12.0](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.11.2...v0.12.0) diff --git a/Gemfile.lock b/Gemfile.lock index 5956b16..a5100b0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - openlayer (0.12.0) + openlayer (0.12.1) cgi connection_pool diff --git a/README.md b/README.md index 4019fe0..e28bab5 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "openlayer", "~> 0.12.0" +gem "openlayer", "~> 0.12.1" ``` diff --git a/lib/openlayer/version.rb b/lib/openlayer/version.rb index c0b0ce3..a51483a 100644 --- a/lib/openlayer/version.rb +++ b/lib/openlayer/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Openlayer - VERSION = "0.12.0" + VERSION = "0.12.1" end