openlayer 0.3.0 → 0.4.1
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/.ignore +2 -0
- data/CHANGELOG.md +36 -0
- data/README.md +280 -39
- data/SECURITY.md +27 -0
- data/lib/openlayer/client.rb +64 -59
- data/lib/openlayer/errors.rb +228 -0
- data/lib/openlayer/file_part.rb +58 -0
- data/lib/openlayer/internal/transport/base_client.rb +567 -0
- data/lib/openlayer/internal/transport/pooled_net_requester.rb +198 -0
- data/lib/openlayer/internal/type/array_of.rb +168 -0
- data/lib/openlayer/internal/type/base_model.rb +531 -0
- data/lib/openlayer/internal/type/base_page.rb +55 -0
- data/lib/openlayer/internal/type/boolean.rb +77 -0
- data/lib/openlayer/internal/type/converter.rb +327 -0
- data/lib/openlayer/internal/type/enum.rb +131 -0
- data/lib/openlayer/internal/type/file_input.rb +111 -0
- data/lib/openlayer/internal/type/hash_of.rb +188 -0
- data/lib/openlayer/internal/type/request_parameters.rb +42 -0
- data/lib/openlayer/internal/type/union.rb +237 -0
- data/lib/openlayer/internal/type/unknown.rb +81 -0
- data/lib/openlayer/internal/util.rb +914 -0
- data/lib/openlayer/internal.rb +20 -0
- data/lib/openlayer/models/commit_retrieve_params.rb +14 -0
- data/lib/openlayer/models/commit_retrieve_response.rb +275 -0
- data/lib/openlayer/models/commits/test_result_list_params.rb +91 -0
- data/lib/openlayer/models/commits/test_result_list_response.rb +566 -0
- data/lib/openlayer/models/inference_pipeline_delete_params.rb +14 -0
- data/lib/openlayer/models/inference_pipeline_retrieve_params.rb +33 -0
- data/lib/openlayer/models/inference_pipeline_retrieve_response.rb +605 -0
- data/lib/openlayer/models/inference_pipeline_update_params.rb +42 -0
- data/lib/openlayer/models/inference_pipeline_update_response.rb +605 -0
- data/lib/openlayer/models/inference_pipelines/data_stream_params.rb +463 -0
- data/lib/openlayer/models/inference_pipelines/data_stream_response.rb +28 -0
- data/lib/openlayer/models/inference_pipelines/row_update_params.rb +90 -0
- data/lib/openlayer/models/inference_pipelines/row_update_response.rb +28 -0
- data/lib/openlayer/models/inference_pipelines/test_result_list_params.rb +83 -0
- data/lib/openlayer/models/inference_pipelines/test_result_list_response.rb +568 -0
- data/lib/openlayer/models/project_create_params.rb +51 -0
- data/lib/openlayer/models/project_create_response.rb +262 -0
- data/lib/openlayer/models/project_list_params.rb +59 -0
- data/lib/openlayer/models/project_list_response.rb +274 -0
- data/lib/openlayer/models/projects/commit_create_params.rb +61 -0
- data/lib/openlayer/models/projects/commit_create_response.rb +277 -0
- data/lib/openlayer/models/projects/commit_list_params.rb +32 -0
- data/lib/openlayer/models/projects/commit_list_response.rb +288 -0
- data/lib/openlayer/models/projects/inference_pipeline_create_params.rb +229 -0
- data/lib/openlayer/models/projects/inference_pipeline_create_response.rb +612 -0
- data/lib/openlayer/models/projects/inference_pipeline_list_params.rb +40 -0
- data/lib/openlayer/models/projects/inference_pipeline_list_response.rb +623 -0
- data/lib/openlayer/models/projects/test_create_params.rb +367 -0
- data/lib/openlayer/models/projects/test_create_response.rb +438 -0
- data/lib/openlayer/models/projects/test_list_params.rb +91 -0
- data/lib/openlayer/models/projects/test_list_response.rb +452 -0
- data/lib/openlayer/models/projects/test_update_params.rb +262 -0
- data/lib/openlayer/models/projects/test_update_response.rb +24 -0
- data/lib/openlayer/models/storage/presigned_url_create_params.rb +24 -0
- data/lib/openlayer/models/storage/presigned_url_create_response.rb +35 -0
- data/lib/openlayer/models.rb +61 -0
- data/lib/openlayer/request_options.rb +77 -0
- data/lib/openlayer/resources/commits/test_results.rb +51 -0
- data/lib/openlayer/resources/commits.rb +38 -0
- data/lib/openlayer/resources/inference_pipelines/data.rb +46 -0
- data/lib/openlayer/resources/inference_pipelines/rows.rb +46 -0
- data/lib/openlayer/resources/inference_pipelines/test_results.rb +49 -0
- data/lib/openlayer/resources/inference_pipelines.rb +101 -0
- data/lib/openlayer/resources/projects/commits.rb +72 -0
- data/lib/openlayer/resources/projects/inference_pipelines.rb +74 -0
- data/lib/openlayer/resources/projects/tests.rb +135 -0
- data/lib/openlayer/resources/projects.rb +80 -0
- data/lib/openlayer/resources/storage/presigned_url.rb +38 -0
- data/lib/openlayer/resources/storage.rb +18 -0
- data/lib/openlayer/version.rb +1 -1
- data/lib/openlayer.rb +96 -12
- data/manifest.yaml +15 -0
- data/rbi/openlayer/client.rbi +58 -0
- data/rbi/openlayer/errors.rbi +205 -0
- data/rbi/openlayer/file_part.rbi +37 -0
- data/rbi/openlayer/internal/transport/base_client.rbi +293 -0
- data/rbi/openlayer/internal/transport/pooled_net_requester.rbi +79 -0
- data/rbi/openlayer/internal/type/array_of.rbi +104 -0
- data/rbi/openlayer/internal/type/base_model.rbi +304 -0
- data/rbi/openlayer/internal/type/base_page.rbi +42 -0
- data/rbi/openlayer/internal/type/boolean.rbi +58 -0
- data/rbi/openlayer/internal/type/converter.rbi +216 -0
- data/rbi/openlayer/internal/type/enum.rbi +82 -0
- data/rbi/openlayer/internal/type/file_input.rbi +59 -0
- data/rbi/openlayer/internal/type/hash_of.rbi +104 -0
- data/rbi/openlayer/internal/type/request_parameters.rbi +29 -0
- data/rbi/openlayer/internal/type/union.rbi +128 -0
- data/rbi/openlayer/internal/type/unknown.rbi +58 -0
- data/rbi/openlayer/internal/util.rbi +487 -0
- data/rbi/openlayer/internal.rbi +18 -0
- data/rbi/openlayer/models/commit_retrieve_params.rbi +27 -0
- data/rbi/openlayer/models/commit_retrieve_response.rbi +393 -0
- data/rbi/openlayer/models/commits/test_result_list_params.rbi +214 -0
- data/rbi/openlayer/models/commits/test_result_list_response.rbi +1256 -0
- data/rbi/openlayer/models/inference_pipeline_delete_params.rbi +30 -0
- data/rbi/openlayer/models/inference_pipeline_retrieve_params.rbi +101 -0
- data/rbi/openlayer/models/inference_pipeline_retrieve_response.rbi +1022 -0
- data/rbi/openlayer/models/inference_pipeline_update_params.rbi +67 -0
- data/rbi/openlayer/models/inference_pipeline_update_response.rbi +1018 -0
- data/rbi/openlayer/models/inference_pipelines/data_stream_params.rbi +750 -0
- data/rbi/openlayer/models/inference_pipelines/data_stream_response.rbi +73 -0
- data/rbi/openlayer/models/inference_pipelines/row_update_params.rbi +153 -0
- data/rbi/openlayer/models/inference_pipelines/row_update_response.rbi +73 -0
- data/rbi/openlayer/models/inference_pipelines/test_result_list_params.rbi +216 -0
- data/rbi/openlayer/models/inference_pipelines/test_result_list_response.rbi +1258 -0
- data/rbi/openlayer/models/project_create_params.rbi +99 -0
- data/rbi/openlayer/models/project_create_response.rbi +401 -0
- data/rbi/openlayer/models/project_list_params.rbi +121 -0
- data/rbi/openlayer/models/project_list_response.rbi +442 -0
- data/rbi/openlayer/models/projects/commit_create_params.rbi +125 -0
- data/rbi/openlayer/models/projects/commit_create_response.rbi +409 -0
- data/rbi/openlayer/models/projects/commit_list_params.rbi +62 -0
- data/rbi/openlayer/models/projects/commit_list_response.rbi +454 -0
- data/rbi/openlayer/models/projects/inference_pipeline_create_params.rbi +560 -0
- data/rbi/openlayer/models/projects/inference_pipeline_create_response.rbi +1027 -0
- data/rbi/openlayer/models/projects/inference_pipeline_list_params.rbi +73 -0
- data/rbi/openlayer/models/projects/inference_pipeline_list_response.rbi +1070 -0
- data/rbi/openlayer/models/projects/test_create_params.rbi +940 -0
- data/rbi/openlayer/models/projects/test_create_response.rbi +1026 -0
- data/rbi/openlayer/models/projects/test_list_params.rbi +165 -0
- data/rbi/openlayer/models/projects/test_list_response.rbi +1067 -0
- data/rbi/openlayer/models/projects/test_update_params.rbi +699 -0
- data/rbi/openlayer/models/projects/test_update_response.rbi +43 -0
- data/rbi/openlayer/models/storage/presigned_url_create_params.rbi +45 -0
- data/rbi/openlayer/models/storage/presigned_url_create_response.rbi +55 -0
- data/rbi/openlayer/models.rbi +26 -0
- data/rbi/openlayer/request_options.rbi +59 -0
- data/rbi/openlayer/resources/commits/test_results.rbi +45 -0
- data/rbi/openlayer/resources/commits.rbi +29 -0
- data/rbi/openlayer/resources/inference_pipelines/data.rbi +41 -0
- data/rbi/openlayer/resources/inference_pipelines/rows.rbi +40 -0
- data/rbi/openlayer/resources/inference_pipelines/test_results.rbi +46 -0
- data/rbi/openlayer/resources/inference_pipelines.rbi +79 -0
- data/rbi/openlayer/resources/projects/commits.rbi +60 -0
- data/rbi/openlayer/resources/projects/inference_pipelines.rbi +69 -0
- data/rbi/openlayer/resources/projects/tests.rbi +123 -0
- data/rbi/openlayer/resources/projects.rbi +64 -0
- data/rbi/openlayer/resources/storage/presigned_url.rbi +28 -0
- data/rbi/openlayer/resources/storage.rbi +15 -0
- data/rbi/openlayer/version.rbi +5 -0
- data/sig/openlayer/client.rbs +32 -0
- data/sig/openlayer/errors.rbs +117 -0
- data/sig/openlayer/file_part.rbs +21 -0
- data/sig/openlayer/internal/transport/base_client.rbs +131 -0
- data/sig/openlayer/internal/transport/pooled_net_requester.rbs +45 -0
- data/sig/openlayer/internal/type/array_of.rbs +48 -0
- data/sig/openlayer/internal/type/base_model.rbs +102 -0
- data/sig/openlayer/internal/type/base_page.rbs +24 -0
- data/sig/openlayer/internal/type/boolean.rbs +26 -0
- data/sig/openlayer/internal/type/converter.rbs +79 -0
- data/sig/openlayer/internal/type/enum.rbs +32 -0
- data/sig/openlayer/internal/type/file_input.rbs +25 -0
- data/sig/openlayer/internal/type/hash_of.rbs +48 -0
- data/sig/openlayer/internal/type/request_parameters.rbs +19 -0
- data/sig/openlayer/internal/type/union.rbs +52 -0
- data/sig/openlayer/internal/type/unknown.rbs +26 -0
- data/sig/openlayer/internal/util.rbs +185 -0
- data/sig/openlayer/internal.rbs +9 -0
- data/sig/openlayer/models/commit_retrieve_params.rbs +15 -0
- data/sig/openlayer/models/commit_retrieve_response.rbs +209 -0
- data/sig/openlayer/models/commits/test_result_list_params.rbs +91 -0
- data/sig/openlayer/models/commits/test_result_list_response.rbs +529 -0
- data/sig/openlayer/models/inference_pipeline_delete_params.rbs +15 -0
- data/sig/openlayer/models/inference_pipeline_retrieve_params.rbs +41 -0
- data/sig/openlayer/models/inference_pipeline_retrieve_response.rbs +493 -0
- data/sig/openlayer/models/inference_pipeline_update_params.rbs +34 -0
- data/sig/openlayer/models/inference_pipeline_update_response.rbs +493 -0
- data/sig/openlayer/models/inference_pipelines/data_stream_params.rbs +386 -0
- data/sig/openlayer/models/inference_pipelines/data_stream_response.rbs +32 -0
- data/sig/openlayer/models/inference_pipelines/row_update_params.rbs +75 -0
- data/sig/openlayer/models/inference_pipelines/row_update_response.rbs +32 -0
- data/sig/openlayer/models/inference_pipelines/test_result_list_params.rbs +84 -0
- data/sig/openlayer/models/inference_pipelines/test_result_list_response.rbs +529 -0
- data/sig/openlayer/models/project_create_params.rbs +53 -0
- data/sig/openlayer/models/project_create_response.rbs +210 -0
- data/sig/openlayer/models/project_list_params.rbs +68 -0
- data/sig/openlayer/models/project_list_response.rbs +225 -0
- data/sig/openlayer/models/projects/commit_create_params.rbs +82 -0
- data/sig/openlayer/models/projects/commit_create_response.rbs +211 -0
- data/sig/openlayer/models/projects/commit_list_params.rbs +34 -0
- data/sig/openlayer/models/projects/commit_list_response.rbs +228 -0
- data/sig/openlayer/models/projects/inference_pipeline_create_params.rbs +308 -0
- data/sig/openlayer/models/projects/inference_pipeline_create_response.rbs +495 -0
- data/sig/openlayer/models/projects/inference_pipeline_list_params.rbs +40 -0
- data/sig/openlayer/models/projects/inference_pipeline_list_response.rbs +512 -0
- data/sig/openlayer/models/projects/test_create_params.rbs +388 -0
- data/sig/openlayer/models/projects/test_create_response.rbs +427 -0
- data/sig/openlayer/models/projects/test_list_params.rbs +85 -0
- data/sig/openlayer/models/projects/test_list_response.rbs +442 -0
- data/sig/openlayer/models/projects/test_update_params.rbs +275 -0
- data/sig/openlayer/models/projects/test_update_response.rbs +25 -0
- data/sig/openlayer/models/storage/presigned_url_create_params.rbs +25 -0
- data/sig/openlayer/models/storage/presigned_url_create_response.rbs +22 -0
- data/sig/openlayer/models.rbs +21 -0
- data/sig/openlayer/request_options.rbs +34 -0
- data/sig/openlayer/resources/commits/test_results.rbs +19 -0
- data/sig/openlayer/resources/commits.rbs +14 -0
- data/sig/openlayer/resources/inference_pipelines/data.rbs +16 -0
- data/sig/openlayer/resources/inference_pipelines/rows.rbs +17 -0
- data/sig/openlayer/resources/inference_pipelines/test_results.rbs +18 -0
- data/sig/openlayer/resources/inference_pipelines.rbs +32 -0
- data/sig/openlayer/resources/projects/commits.rbs +25 -0
- data/sig/openlayer/resources/projects/inference_pipelines.rbs +26 -0
- data/sig/openlayer/resources/projects/tests.rbs +45 -0
- data/sig/openlayer/resources/projects.rbs +28 -0
- data/sig/openlayer/resources/storage/presigned_url.rbs +14 -0
- data/sig/openlayer/resources/storage.rbs +9 -0
- data/sig/openlayer/version.rbs +3 -0
- metadata +223 -91
- data/.env +0 -0
- data/.rspec +0 -3
- data/.rubocop.yml +0 -13
- data/LICENSE +0 -21
- data/Rakefile +0 -12
- data/examples/staging/.DS_Store +0 -0
- data/examples/staging/commit.yaml +0 -2
- data/examples/staging/model/model_config.yaml +0 -12
- data/examples/staging/validation/dataset_config.yaml +0 -12
- data/lib/openlayer/error.rb +0 -5
- data/lib/openlayer/inference_pipeline.rb +0 -36
- data/lib/openlayer/object.rb +0 -28
- data/lib/openlayer/objects/project.rb +0 -185
- data/lib/openlayer/objects/project_version.rb +0 -89
- data/lib/openlayer/services/s3_presigned_client.rb +0 -47
- data/lib/openlayer/services/tar_file_helper.rb +0 -55
- data/openlayer.gemspec +0 -45
- data/sig/openlayer.rbs +0 -4
| @@ -0,0 +1,487 @@ | |
| 1 | 
            +
            # typed: strong
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Openlayer
         | 
| 4 | 
            +
              module Internal
         | 
| 5 | 
            +
                # @api private
         | 
| 6 | 
            +
                module Util
         | 
| 7 | 
            +
                  extend Openlayer::Internal::Util::SorbetRuntimeSupport
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                  # @api private
         | 
| 10 | 
            +
                  sig { returns(Float) }
         | 
| 11 | 
            +
                  def self.monotonic_secs
         | 
| 12 | 
            +
                  end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                  # @api private
         | 
| 15 | 
            +
                  sig do
         | 
| 16 | 
            +
                    params(ns: T.any(Module, T::Class[T.anything])).returns(
         | 
| 17 | 
            +
                      T::Enumerable[T.any(Module, T::Class[T.anything])]
         | 
| 18 | 
            +
                    )
         | 
| 19 | 
            +
                  end
         | 
| 20 | 
            +
                  def self.walk_namespaces(ns)
         | 
| 21 | 
            +
                  end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                  class << self
         | 
| 24 | 
            +
                    # @api private
         | 
| 25 | 
            +
                    sig { returns(String) }
         | 
| 26 | 
            +
                    def arch
         | 
| 27 | 
            +
                    end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
                    # @api private
         | 
| 30 | 
            +
                    sig { returns(String) }
         | 
| 31 | 
            +
                    def os
         | 
| 32 | 
            +
                    end
         | 
| 33 | 
            +
                  end
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                  class << self
         | 
| 36 | 
            +
                    # @api private
         | 
| 37 | 
            +
                    sig { params(input: T.anything).returns(T::Boolean) }
         | 
| 38 | 
            +
                    def primitive?(input)
         | 
| 39 | 
            +
                    end
         | 
| 40 | 
            +
             | 
| 41 | 
            +
                    # @api private
         | 
| 42 | 
            +
                    sig do
         | 
| 43 | 
            +
                      params(input: T.any(String, T::Boolean)).returns(
         | 
| 44 | 
            +
                        T.any(T::Boolean, T.anything)
         | 
| 45 | 
            +
                      )
         | 
| 46 | 
            +
                    end
         | 
| 47 | 
            +
                    def coerce_boolean(input)
         | 
| 48 | 
            +
                    end
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                    # @api private
         | 
| 51 | 
            +
                    sig do
         | 
| 52 | 
            +
                      params(input: T.any(String, T::Boolean)).returns(
         | 
| 53 | 
            +
                        T.nilable(T::Boolean)
         | 
| 54 | 
            +
                      )
         | 
| 55 | 
            +
                    end
         | 
| 56 | 
            +
                    def coerce_boolean!(input)
         | 
| 57 | 
            +
                    end
         | 
| 58 | 
            +
             | 
| 59 | 
            +
                    # @api private
         | 
| 60 | 
            +
                    sig do
         | 
| 61 | 
            +
                      params(input: T.any(String, Integer)).returns(
         | 
| 62 | 
            +
                        T.any(Integer, T.anything)
         | 
| 63 | 
            +
                      )
         | 
| 64 | 
            +
                    end
         | 
| 65 | 
            +
                    def coerce_integer(input)
         | 
| 66 | 
            +
                    end
         | 
| 67 | 
            +
             | 
| 68 | 
            +
                    # @api private
         | 
| 69 | 
            +
                    sig do
         | 
| 70 | 
            +
                      params(input: T.any(String, Integer, Float)).returns(
         | 
| 71 | 
            +
                        T.any(Float, T.anything)
         | 
| 72 | 
            +
                      )
         | 
| 73 | 
            +
                    end
         | 
| 74 | 
            +
                    def coerce_float(input)
         | 
| 75 | 
            +
                    end
         | 
| 76 | 
            +
             | 
| 77 | 
            +
                    # @api private
         | 
| 78 | 
            +
                    sig do
         | 
| 79 | 
            +
                      params(input: T.anything).returns(
         | 
| 80 | 
            +
                        T.any(T::Hash[T.anything, T.anything], T.anything)
         | 
| 81 | 
            +
                      )
         | 
| 82 | 
            +
                    end
         | 
| 83 | 
            +
                    def coerce_hash(input)
         | 
| 84 | 
            +
                    end
         | 
| 85 | 
            +
             | 
| 86 | 
            +
                    # @api private
         | 
| 87 | 
            +
                    sig do
         | 
| 88 | 
            +
                      params(input: T.anything).returns(
         | 
| 89 | 
            +
                        T.nilable(T::Hash[T.anything, T.anything])
         | 
| 90 | 
            +
                      )
         | 
| 91 | 
            +
                    end
         | 
| 92 | 
            +
                    def coerce_hash!(input)
         | 
| 93 | 
            +
                    end
         | 
| 94 | 
            +
                  end
         | 
| 95 | 
            +
             | 
| 96 | 
            +
                  class << self
         | 
| 97 | 
            +
                    # @api private
         | 
| 98 | 
            +
                    sig do
         | 
| 99 | 
            +
                      params(lhs: T.anything, rhs: T.anything, concat: T::Boolean).returns(
         | 
| 100 | 
            +
                        T.anything
         | 
| 101 | 
            +
                      )
         | 
| 102 | 
            +
                    end
         | 
| 103 | 
            +
                    private def deep_merge_lr(lhs, rhs, concat: false)
         | 
| 104 | 
            +
                    end
         | 
| 105 | 
            +
             | 
| 106 | 
            +
                    # @api private
         | 
| 107 | 
            +
                    #
         | 
| 108 | 
            +
                    # Recursively merge one hash with another. If the values at a given key are not
         | 
| 109 | 
            +
                    # both hashes, just take the new value.
         | 
| 110 | 
            +
                    sig do
         | 
| 111 | 
            +
                      params(
         | 
| 112 | 
            +
                        values: T::Array[T.anything],
         | 
| 113 | 
            +
                        sentinel: T.nilable(T.anything),
         | 
| 114 | 
            +
                        concat: T::Boolean
         | 
| 115 | 
            +
                      ).returns(T.anything)
         | 
| 116 | 
            +
                    end
         | 
| 117 | 
            +
                    def deep_merge(
         | 
| 118 | 
            +
                      *values,
         | 
| 119 | 
            +
                      # the value to return if no values are provided.
         | 
| 120 | 
            +
                      sentinel: nil,
         | 
| 121 | 
            +
                      # whether to merge sequences by concatenation.
         | 
| 122 | 
            +
                      concat: false
         | 
| 123 | 
            +
                    )
         | 
| 124 | 
            +
                    end
         | 
| 125 | 
            +
             | 
| 126 | 
            +
                    # @api private
         | 
| 127 | 
            +
                    sig do
         | 
| 128 | 
            +
                      params(
         | 
| 129 | 
            +
                        data:
         | 
| 130 | 
            +
                          T.any(
         | 
| 131 | 
            +
                            Openlayer::Internal::AnyHash,
         | 
| 132 | 
            +
                            T::Array[T.anything],
         | 
| 133 | 
            +
                            T.anything
         | 
| 134 | 
            +
                          ),
         | 
| 135 | 
            +
                        pick:
         | 
| 136 | 
            +
                          T.nilable(
         | 
| 137 | 
            +
                            T.any(
         | 
| 138 | 
            +
                              Symbol,
         | 
| 139 | 
            +
                              Integer,
         | 
| 140 | 
            +
                              T::Array[T.any(Symbol, Integer)],
         | 
| 141 | 
            +
                              T.proc.params(arg0: T.anything).returns(T.anything)
         | 
| 142 | 
            +
                            )
         | 
| 143 | 
            +
                          ),
         | 
| 144 | 
            +
                        blk: T.nilable(T.proc.returns(T.anything))
         | 
| 145 | 
            +
                      ).returns(T.nilable(T.anything))
         | 
| 146 | 
            +
                    end
         | 
| 147 | 
            +
                    def dig(data, pick, &blk)
         | 
| 148 | 
            +
                    end
         | 
| 149 | 
            +
                  end
         | 
| 150 | 
            +
             | 
| 151 | 
            +
                  class << self
         | 
| 152 | 
            +
                    # @api private
         | 
| 153 | 
            +
                    sig { params(uri: URI::Generic).returns(String) }
         | 
| 154 | 
            +
                    def uri_origin(uri)
         | 
| 155 | 
            +
                    end
         | 
| 156 | 
            +
             | 
| 157 | 
            +
                    # @api private
         | 
| 158 | 
            +
                    sig { params(path: T.any(String, T::Array[String])).returns(String) }
         | 
| 159 | 
            +
                    def interpolate_path(path)
         | 
| 160 | 
            +
                    end
         | 
| 161 | 
            +
                  end
         | 
| 162 | 
            +
             | 
| 163 | 
            +
                  class << self
         | 
| 164 | 
            +
                    # @api private
         | 
| 165 | 
            +
                    sig do
         | 
| 166 | 
            +
                      params(query: T.nilable(String)).returns(
         | 
| 167 | 
            +
                        T::Hash[String, T::Array[String]]
         | 
| 168 | 
            +
                      )
         | 
| 169 | 
            +
                    end
         | 
| 170 | 
            +
                    def decode_query(query)
         | 
| 171 | 
            +
                    end
         | 
| 172 | 
            +
             | 
| 173 | 
            +
                    # @api private
         | 
| 174 | 
            +
                    sig do
         | 
| 175 | 
            +
                      params(
         | 
| 176 | 
            +
                        query:
         | 
| 177 | 
            +
                          T.nilable(
         | 
| 178 | 
            +
                            T::Hash[String, T.nilable(T.any(T::Array[String], String))]
         | 
| 179 | 
            +
                          )
         | 
| 180 | 
            +
                      ).returns(T.nilable(String))
         | 
| 181 | 
            +
                    end
         | 
| 182 | 
            +
                    def encode_query(query)
         | 
| 183 | 
            +
                    end
         | 
| 184 | 
            +
                  end
         | 
| 185 | 
            +
             | 
| 186 | 
            +
                  ParsedUri =
         | 
| 187 | 
            +
                    T.type_alias do
         | 
| 188 | 
            +
                      {
         | 
| 189 | 
            +
                        scheme: T.nilable(String),
         | 
| 190 | 
            +
                        host: T.nilable(String),
         | 
| 191 | 
            +
                        port: T.nilable(Integer),
         | 
| 192 | 
            +
                        path: T.nilable(String),
         | 
| 193 | 
            +
                        query: T::Hash[String, T::Array[String]]
         | 
| 194 | 
            +
                      }
         | 
| 195 | 
            +
                    end
         | 
| 196 | 
            +
             | 
| 197 | 
            +
                  class << self
         | 
| 198 | 
            +
                    # @api private
         | 
| 199 | 
            +
                    sig do
         | 
| 200 | 
            +
                      params(url: T.any(URI::Generic, String)).returns(
         | 
| 201 | 
            +
                        Openlayer::Internal::Util::ParsedUri
         | 
| 202 | 
            +
                      )
         | 
| 203 | 
            +
                    end
         | 
| 204 | 
            +
                    def parse_uri(url)
         | 
| 205 | 
            +
                    end
         | 
| 206 | 
            +
             | 
| 207 | 
            +
                    # @api private
         | 
| 208 | 
            +
                    sig do
         | 
| 209 | 
            +
                      params(parsed: Openlayer::Internal::Util::ParsedUri).returns(
         | 
| 210 | 
            +
                        URI::Generic
         | 
| 211 | 
            +
                      )
         | 
| 212 | 
            +
                    end
         | 
| 213 | 
            +
                    def unparse_uri(parsed)
         | 
| 214 | 
            +
                    end
         | 
| 215 | 
            +
             | 
| 216 | 
            +
                    # @api private
         | 
| 217 | 
            +
                    sig do
         | 
| 218 | 
            +
                      params(
         | 
| 219 | 
            +
                        lhs: Openlayer::Internal::Util::ParsedUri,
         | 
| 220 | 
            +
                        rhs: Openlayer::Internal::Util::ParsedUri
         | 
| 221 | 
            +
                      ).returns(URI::Generic)
         | 
| 222 | 
            +
                    end
         | 
| 223 | 
            +
                    def join_parsed_uri(lhs, rhs)
         | 
| 224 | 
            +
                    end
         | 
| 225 | 
            +
                  end
         | 
| 226 | 
            +
             | 
| 227 | 
            +
                  class << self
         | 
| 228 | 
            +
                    # @api private
         | 
| 229 | 
            +
                    sig do
         | 
| 230 | 
            +
                      params(
         | 
| 231 | 
            +
                        headers:
         | 
| 232 | 
            +
                          T::Hash[
         | 
| 233 | 
            +
                            String,
         | 
| 234 | 
            +
                            T.nilable(
         | 
| 235 | 
            +
                              T.any(
         | 
| 236 | 
            +
                                String,
         | 
| 237 | 
            +
                                Integer,
         | 
| 238 | 
            +
                                T::Array[T.nilable(T.any(String, Integer))]
         | 
| 239 | 
            +
                              )
         | 
| 240 | 
            +
                            )
         | 
| 241 | 
            +
                          ]
         | 
| 242 | 
            +
                      ).returns(T::Hash[String, String])
         | 
| 243 | 
            +
                    end
         | 
| 244 | 
            +
                    def normalized_headers(*headers)
         | 
| 245 | 
            +
                    end
         | 
| 246 | 
            +
                  end
         | 
| 247 | 
            +
             | 
| 248 | 
            +
                  # @api private
         | 
| 249 | 
            +
                  #
         | 
| 250 | 
            +
                  # An adapter that satisfies the IO interface required by `::IO.copy_stream`
         | 
| 251 | 
            +
                  class ReadIOAdapter
         | 
| 252 | 
            +
                    # @api private
         | 
| 253 | 
            +
                    sig { returns(T.nilable(T::Boolean)) }
         | 
| 254 | 
            +
                    def close?
         | 
| 255 | 
            +
                    end
         | 
| 256 | 
            +
             | 
| 257 | 
            +
                    # @api private
         | 
| 258 | 
            +
                    sig { void }
         | 
| 259 | 
            +
                    def close
         | 
| 260 | 
            +
                    end
         | 
| 261 | 
            +
             | 
| 262 | 
            +
                    # @api private
         | 
| 263 | 
            +
                    sig { params(max_len: T.nilable(Integer)).returns(String) }
         | 
| 264 | 
            +
                    private def read_enum(max_len)
         | 
| 265 | 
            +
                    end
         | 
| 266 | 
            +
             | 
| 267 | 
            +
                    # @api private
         | 
| 268 | 
            +
                    sig do
         | 
| 269 | 
            +
                      params(
         | 
| 270 | 
            +
                        max_len: T.nilable(Integer),
         | 
| 271 | 
            +
                        out_string: T.nilable(String)
         | 
| 272 | 
            +
                      ).returns(T.nilable(String))
         | 
| 273 | 
            +
                    end
         | 
| 274 | 
            +
                    def read(max_len = nil, out_string = nil)
         | 
| 275 | 
            +
                    end
         | 
| 276 | 
            +
             | 
| 277 | 
            +
                    # @api private
         | 
| 278 | 
            +
                    sig do
         | 
| 279 | 
            +
                      params(
         | 
| 280 | 
            +
                        src: T.any(String, Pathname, StringIO, T::Enumerable[String]),
         | 
| 281 | 
            +
                        blk: T.proc.params(arg0: String).void
         | 
| 282 | 
            +
                      ).returns(T.attached_class)
         | 
| 283 | 
            +
                    end
         | 
| 284 | 
            +
                    def self.new(src, &blk)
         | 
| 285 | 
            +
                    end
         | 
| 286 | 
            +
                  end
         | 
| 287 | 
            +
             | 
| 288 | 
            +
                  class << self
         | 
| 289 | 
            +
                    sig do
         | 
| 290 | 
            +
                      params(blk: T.proc.params(y: Enumerator::Yielder).void).returns(
         | 
| 291 | 
            +
                        T::Enumerable[String]
         | 
| 292 | 
            +
                      )
         | 
| 293 | 
            +
                    end
         | 
| 294 | 
            +
                    def writable_enum(&blk)
         | 
| 295 | 
            +
                    end
         | 
| 296 | 
            +
                  end
         | 
| 297 | 
            +
             | 
| 298 | 
            +
                  JSON_CONTENT =
         | 
| 299 | 
            +
                    T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp)
         | 
| 300 | 
            +
                  JSONL_CONTENT =
         | 
| 301 | 
            +
                    T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
         | 
| 302 | 
            +
             | 
| 303 | 
            +
                  class << self
         | 
| 304 | 
            +
                    # @api private
         | 
| 305 | 
            +
                    sig do
         | 
| 306 | 
            +
                      params(
         | 
| 307 | 
            +
                        y: Enumerator::Yielder,
         | 
| 308 | 
            +
                        val: T.anything,
         | 
| 309 | 
            +
                        closing: T::Array[T.proc.void],
         | 
| 310 | 
            +
                        content_type: T.nilable(String)
         | 
| 311 | 
            +
                      ).void
         | 
| 312 | 
            +
                    end
         | 
| 313 | 
            +
                    private def write_multipart_content(
         | 
| 314 | 
            +
                      y,
         | 
| 315 | 
            +
                      val:,
         | 
| 316 | 
            +
                      closing:,
         | 
| 317 | 
            +
                      content_type: nil
         | 
| 318 | 
            +
                    )
         | 
| 319 | 
            +
                    end
         | 
| 320 | 
            +
             | 
| 321 | 
            +
                    # @api private
         | 
| 322 | 
            +
                    sig do
         | 
| 323 | 
            +
                      params(
         | 
| 324 | 
            +
                        y: Enumerator::Yielder,
         | 
| 325 | 
            +
                        boundary: String,
         | 
| 326 | 
            +
                        key: T.any(Symbol, String),
         | 
| 327 | 
            +
                        val: T.anything,
         | 
| 328 | 
            +
                        closing: T::Array[T.proc.void]
         | 
| 329 | 
            +
                      ).void
         | 
| 330 | 
            +
                    end
         | 
| 331 | 
            +
                    private def write_multipart_chunk(y, boundary:, key:, val:, closing:)
         | 
| 332 | 
            +
                    end
         | 
| 333 | 
            +
             | 
| 334 | 
            +
                    # @api private
         | 
| 335 | 
            +
                    #
         | 
| 336 | 
            +
                    # https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content
         | 
| 337 | 
            +
                    sig do
         | 
| 338 | 
            +
                      params(body: T.anything).returns([String, T::Enumerable[String]])
         | 
| 339 | 
            +
                    end
         | 
| 340 | 
            +
                    private def encode_multipart_streaming(body)
         | 
| 341 | 
            +
                    end
         | 
| 342 | 
            +
             | 
| 343 | 
            +
                    # @api private
         | 
| 344 | 
            +
                    sig do
         | 
| 345 | 
            +
                      params(headers: T::Hash[String, String], body: T.anything).returns(
         | 
| 346 | 
            +
                        T.anything
         | 
| 347 | 
            +
                      )
         | 
| 348 | 
            +
                    end
         | 
| 349 | 
            +
                    def encode_content(headers, body)
         | 
| 350 | 
            +
                    end
         | 
| 351 | 
            +
             | 
| 352 | 
            +
                    # @api private
         | 
| 353 | 
            +
                    #
         | 
| 354 | 
            +
                    # https://www.iana.org/assignments/character-sets/character-sets.xhtml
         | 
| 355 | 
            +
                    sig { params(content_type: String, text: String).void }
         | 
| 356 | 
            +
                    def force_charset!(content_type, text:)
         | 
| 357 | 
            +
                    end
         | 
| 358 | 
            +
             | 
| 359 | 
            +
                    # @api private
         | 
| 360 | 
            +
                    #
         | 
| 361 | 
            +
                    # Assumes each chunk in stream has `Encoding::BINARY`.
         | 
| 362 | 
            +
                    sig do
         | 
| 363 | 
            +
                      params(
         | 
| 364 | 
            +
                        headers: T::Hash[String, String],
         | 
| 365 | 
            +
                        stream: T::Enumerable[String],
         | 
| 366 | 
            +
                        suppress_error: T::Boolean
         | 
| 367 | 
            +
                      ).returns(T.anything)
         | 
| 368 | 
            +
                    end
         | 
| 369 | 
            +
                    def decode_content(headers, stream:, suppress_error: false)
         | 
| 370 | 
            +
                    end
         | 
| 371 | 
            +
                  end
         | 
| 372 | 
            +
             | 
| 373 | 
            +
                  class << self
         | 
| 374 | 
            +
                    # @api private
         | 
| 375 | 
            +
                    #
         | 
| 376 | 
            +
                    # https://doc.rust-lang.org/std/iter/trait.FusedIterator.html
         | 
| 377 | 
            +
                    sig do
         | 
| 378 | 
            +
                      params(
         | 
| 379 | 
            +
                        enum: T::Enumerable[T.anything],
         | 
| 380 | 
            +
                        external: T::Boolean,
         | 
| 381 | 
            +
                        close: T.proc.void
         | 
| 382 | 
            +
                      ).returns(T::Enumerable[T.anything])
         | 
| 383 | 
            +
                    end
         | 
| 384 | 
            +
                    def fused_enum(enum, external: false, &close)
         | 
| 385 | 
            +
                    end
         | 
| 386 | 
            +
             | 
| 387 | 
            +
                    # @api private
         | 
| 388 | 
            +
                    sig { params(enum: T.nilable(T::Enumerable[T.anything])).void }
         | 
| 389 | 
            +
                    def close_fused!(enum)
         | 
| 390 | 
            +
                    end
         | 
| 391 | 
            +
             | 
| 392 | 
            +
                    # @api private
         | 
| 393 | 
            +
                    sig do
         | 
| 394 | 
            +
                      params(
         | 
| 395 | 
            +
                        enum: T.nilable(T::Enumerable[T.anything]),
         | 
| 396 | 
            +
                        blk: T.proc.params(arg0: Enumerator::Yielder).void
         | 
| 397 | 
            +
                      ).returns(T::Enumerable[T.anything])
         | 
| 398 | 
            +
                    end
         | 
| 399 | 
            +
                    def chain_fused(enum, &blk)
         | 
| 400 | 
            +
                    end
         | 
| 401 | 
            +
                  end
         | 
| 402 | 
            +
             | 
| 403 | 
            +
                  ServerSentEvent =
         | 
| 404 | 
            +
                    T.type_alias do
         | 
| 405 | 
            +
                      {
         | 
| 406 | 
            +
                        event: T.nilable(String),
         | 
| 407 | 
            +
                        data: T.nilable(String),
         | 
| 408 | 
            +
                        id: T.nilable(String),
         | 
| 409 | 
            +
                        retry: T.nilable(Integer)
         | 
| 410 | 
            +
                      }
         | 
| 411 | 
            +
                    end
         | 
| 412 | 
            +
             | 
| 413 | 
            +
                  class << self
         | 
| 414 | 
            +
                    # @api private
         | 
| 415 | 
            +
                    #
         | 
| 416 | 
            +
                    # Assumes Strings have been forced into having `Encoding::BINARY`.
         | 
| 417 | 
            +
                    #
         | 
| 418 | 
            +
                    # This decoder is responsible for reassembling lines split across multiple
         | 
| 419 | 
            +
                    # fragments.
         | 
| 420 | 
            +
                    sig do
         | 
| 421 | 
            +
                      params(enum: T::Enumerable[String]).returns(T::Enumerable[String])
         | 
| 422 | 
            +
                    end
         | 
| 423 | 
            +
                    def decode_lines(enum)
         | 
| 424 | 
            +
                    end
         | 
| 425 | 
            +
             | 
| 426 | 
            +
                    # @api private
         | 
| 427 | 
            +
                    #
         | 
| 428 | 
            +
                    # https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream
         | 
| 429 | 
            +
                    #
         | 
| 430 | 
            +
                    # Assumes that `lines` has been decoded with `#decode_lines`.
         | 
| 431 | 
            +
                    sig do
         | 
| 432 | 
            +
                      params(lines: T::Enumerable[String]).returns(
         | 
| 433 | 
            +
                        T::Enumerable[Openlayer::Internal::Util::ServerSentEvent]
         | 
| 434 | 
            +
                      )
         | 
| 435 | 
            +
                    end
         | 
| 436 | 
            +
                    def decode_sse(lines)
         | 
| 437 | 
            +
                    end
         | 
| 438 | 
            +
                  end
         | 
| 439 | 
            +
             | 
| 440 | 
            +
                  # @api private
         | 
| 441 | 
            +
                  module SorbetRuntimeSupport
         | 
| 442 | 
            +
                    class MissingSorbetRuntimeError < ::RuntimeError
         | 
| 443 | 
            +
                    end
         | 
| 444 | 
            +
             | 
| 445 | 
            +
                    # @api private
         | 
| 446 | 
            +
                    sig { returns(T::Hash[Symbol, T.anything]) }
         | 
| 447 | 
            +
                    private def sorbet_runtime_constants
         | 
| 448 | 
            +
                    end
         | 
| 449 | 
            +
             | 
| 450 | 
            +
                    # @api private
         | 
| 451 | 
            +
                    sig { params(name: Symbol).void }
         | 
| 452 | 
            +
                    def const_missing(name)
         | 
| 453 | 
            +
                    end
         | 
| 454 | 
            +
             | 
| 455 | 
            +
                    # @api private
         | 
| 456 | 
            +
                    sig { params(name: Symbol).returns(T::Boolean) }
         | 
| 457 | 
            +
                    def sorbet_constant_defined?(name)
         | 
| 458 | 
            +
                    end
         | 
| 459 | 
            +
             | 
| 460 | 
            +
                    # @api private
         | 
| 461 | 
            +
                    sig { params(name: Symbol, blk: T.proc.returns(T.anything)).void }
         | 
| 462 | 
            +
                    def define_sorbet_constant!(name, &blk)
         | 
| 463 | 
            +
                    end
         | 
| 464 | 
            +
             | 
| 465 | 
            +
                    # @api private
         | 
| 466 | 
            +
                    sig { returns(T.anything) }
         | 
| 467 | 
            +
                    def to_sorbet_type
         | 
| 468 | 
            +
                    end
         | 
| 469 | 
            +
             | 
| 470 | 
            +
                    class << self
         | 
| 471 | 
            +
                      # @api private
         | 
| 472 | 
            +
                      sig do
         | 
| 473 | 
            +
                        params(
         | 
| 474 | 
            +
                          type:
         | 
| 475 | 
            +
                            T.any(
         | 
| 476 | 
            +
                              Openlayer::Internal::Util::SorbetRuntimeSupport,
         | 
| 477 | 
            +
                              T.anything
         | 
| 478 | 
            +
                            )
         | 
| 479 | 
            +
                        ).returns(T.anything)
         | 
| 480 | 
            +
                      end
         | 
| 481 | 
            +
                      def to_sorbet_type(type)
         | 
| 482 | 
            +
                      end
         | 
| 483 | 
            +
                    end
         | 
| 484 | 
            +
                  end
         | 
| 485 | 
            +
                end
         | 
| 486 | 
            +
              end
         | 
| 487 | 
            +
            end
         | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            # typed: strong
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Openlayer
         | 
| 4 | 
            +
              module Internal
         | 
| 5 | 
            +
                extend Openlayer::Internal::Util::SorbetRuntimeSupport
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                # Due to the current WIP status of Shapes support in Sorbet, types referencing
         | 
| 8 | 
            +
                # this alias might be refined in the future.
         | 
| 9 | 
            +
                AnyHash = T.type_alias { T::Hash[Symbol, T.anything] }
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                FileInput =
         | 
| 12 | 
            +
                  T.type_alias do
         | 
| 13 | 
            +
                    T.any(Pathname, StringIO, IO, String, Openlayer::FilePart)
         | 
| 14 | 
            +
                  end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                OMIT = T.let(Object.new.freeze, T.anything)
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
            end
         | 
| @@ -0,0 +1,27 @@ | |
| 1 | 
            +
            # typed: strong
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Openlayer
         | 
| 4 | 
            +
              module Models
         | 
| 5 | 
            +
                class CommitRetrieveParams < Openlayer::Internal::Type::BaseModel
         | 
| 6 | 
            +
                  extend Openlayer::Internal::Type::RequestParameters::Converter
         | 
| 7 | 
            +
                  include Openlayer::Internal::Type::RequestParameters
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                  OrHash =
         | 
| 10 | 
            +
                    T.type_alias do
         | 
| 11 | 
            +
                      T.any(Openlayer::CommitRetrieveParams, Openlayer::Internal::AnyHash)
         | 
| 12 | 
            +
                    end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                  sig do
         | 
| 15 | 
            +
                    params(request_options: Openlayer::RequestOptions::OrHash).returns(
         | 
| 16 | 
            +
                      T.attached_class
         | 
| 17 | 
            +
                    )
         | 
| 18 | 
            +
                  end
         | 
| 19 | 
            +
                  def self.new(request_options: {})
         | 
| 20 | 
            +
                  end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                  sig { override.returns({ request_options: Openlayer::RequestOptions }) }
         | 
| 23 | 
            +
                  def to_hash
         | 
| 24 | 
            +
                  end
         | 
| 25 | 
            +
                end
         | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
            end
         |