diff --git a/Gemfile b/Gemfile index d3e9580e3..6f5643fe0 100644 --- a/Gemfile +++ b/Gemfile @@ -20,6 +20,7 @@ end group :development, :test do gem "smart_properties", require: false + gem "json_api_client", require: false gem "frozen_record", require: false gem "sprockets", require: false gem "rails", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 362a1a0b6..8c6f39197 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -155,6 +155,31 @@ GEM dry-schema (>= 1.12, < 2) zeitwerk (~> 2.6) erubi (1.12.0) + faraday (1.10.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.0) + faraday (~> 1.0) frozen_record (0.27.0) activemodel globalid (1.1.0) @@ -173,6 +198,13 @@ GEM irb (1.6.4) reline (>= 0.3.0) json (2.6.3) + json_api_client (1.21.1) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + addressable (~> 2.2) + faraday (>= 0.15.2, < 2.0) + faraday_middleware (>= 0.9.0, < 2.0) + rack (>= 0.2) kramdown (2.4.0) rexml kredis (1.5.0) @@ -198,6 +230,7 @@ GEM builder minitest (>= 5.0) ruby-progressbar + multipart-post (2.3.0) net-imap (0.3.6) date net-protocol @@ -298,6 +331,7 @@ GEM rubocop-sorbet (0.7.0) rubocop (>= 0.90.0) ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) shopify-money (1.2.1) sidekiq (7.1.2) concurrent-ruby (< 2) @@ -374,6 +408,7 @@ DEPENDENCIES google-protobuf graphql identity_cache + json_api_client kramdown (~> 2.4) kredis minitest diff --git a/gemfiles/Gemfile-rails-6-1 b/gemfiles/Gemfile-rails-6-1 index ec224958e..e36a7e9cd 100644 --- a/gemfiles/Gemfile-rails-6-1 +++ b/gemfiles/Gemfile-rails-6-1 @@ -19,6 +19,7 @@ end group(:development, :test) do gem("smart_properties", require: false) + gem("json_api_client", require: false) gem("frozen_record", require: false) gem("sprockets", require: false) gem("rails", "~> 6.1.0", require: false) diff --git a/gemfiles/Gemfile-rails-main b/gemfiles/Gemfile-rails-main index 6b25ffc50..986414028 100644 --- a/gemfiles/Gemfile-rails-main +++ b/gemfiles/Gemfile-rails-main @@ -19,6 +19,7 @@ end group(:development, :test) do gem("smart_properties", require: false) + gem("json_api_client", require: false) gem("frozen_record", require: false) gem("sprockets", require: false) gem("rails", github: "rails/rails", branch: "main", require: false) diff --git a/lib/tapioca/dsl/compilers/json_api_client_resource.rb b/lib/tapioca/dsl/compilers/json_api_client_resource.rb new file mode 100644 index 000000000..8d9a3288a --- /dev/null +++ b/lib/tapioca/dsl/compilers/json_api_client_resource.rb @@ -0,0 +1,208 @@ +# typed: strict +# frozen_string_literal: true + +begin + require "json_api_client" +rescue LoadError + # means JsonApiClient is not installed, + # so let's not even define the compiler. + return +end + +module Tapioca + module Dsl + module Compilers + # `Tapioca::Dsl::Compilers::JsonApiClientResource` generates RBI files for classes that inherit + # [`JsonApiClient::Resource`](https://github.com/JsonApiClient/json_api_client). + # + # For example, with the following classes that inherits `JsonApiClient::Resource`: + # + # ~~~rb + # # user.rb + # class User < JsonApiClient::Resource + # has_many :posts + # + # property :name, type: :string + # property :is_admin, type: :boolean, default: false + # end + # + # # post.rb + # class Post < JsonApiClient::Resource + # belongs_to :user + # + # property :title, type: :string + # end + # ~~~ + # + # this compiler will produce RBI files with the following content: + # + # ~~~rbi + # # user.rbi + # # typed: strong + # + # class User + # include JsonApiClientResourceGeneratedMethods + # + # module JsonApiClientResourceGeneratedMethods + # sig { returns(T::Boolean) } + # def is_admin; end + # + # sig { params(is_admin: T::Boolean).returns(T::Boolean) } + # def is_admin=(is_admin); end + # + # sig { returns(T.nilable(::String)) } + # def name; end + # + # sig { params(name: T.nilable(::String)).returns(T.nilable(::String)) } + # def name=(name); end + # + # sig { returns(T.nilable(T::Array[Post])) } + # def posts; end + # + # sig { params(posts: T.nilable(T::Array[Post])).returns(T.nilable(T::Array[Post])) } + # def posts=(posts); end + # end + # end + # + # # post.rbi + # # typed: strong + # + # class Post + # include JsonApiClientResourceGeneratedMethods + # + # module JsonApiClientResourceGeneratedMethods + # sig { returns(T.nilable(::String)) } + # def title; end + # + # sig { params(title: T.nilable(::String)).returns(T.nilable(::String)) } + # def title=(title); end + # + # sig { returns(T.nilable(::String)) } + # def user_id; end + # + # sig { params(user_id: T.nilable(::String)).returns(T.nilable(::String)) } + # def user_id=(user_id); end + # end + # end + # ~~~ + class JsonApiClientResource < Compiler + extend T::Sig + + ConstantType = type_member { { fixed: T.class_of(::JsonApiClient::Resource) } } + + sig { override.void } + def decorate + schema = resource_schema + return if schema.nil? && constant.associations.empty? + + root.create_path(constant) do |k| + module_name = "JsonApiClientResourceGeneratedMethods" + k.create_module(module_name) do |mod| + schema&.each_property do |property| + generate_methods_for_property(mod, property) + end + + constant.associations.each do |association| + generate_methods_for_association(mod, association) + end + end + + k.create_include(module_name) + end + end + + class << self + extend T::Sig + + sig { override.returns(T::Enumerable[Module]) } + def gather_constants + all_modules.select do |c| + name_of(c) && c < ::JsonApiClient::Resource + end + end + end + + private + + sig { returns(T.nilable(::JsonApiClient::Schema)) } + def resource_schema + schema = constant.schema + + # empty? does not exist on JsonApiClient::Schema + schema if schema.size > 0 # rubocop:disable Style/ZeroLengthPredicate + end + + sig do + params( + mod: RBI::Scope, + property: ::JsonApiClient::Schema::Property, + ).void + end + def generate_methods_for_property(mod, property) + type = type_for(property) + + name = property.name.to_s + + mod.create_method(name, return_type: type) + mod.create_method("#{name}=", parameters: [create_param(name, type: type)], return_type: type) + end + + sig { params(property: ::JsonApiClient::Schema::Property).returns(String) } + def type_for(property) + type = ::JsonApiClient::Schema::TypeFactory.type_for(property.type) + return "T.untyped" if type.nil? + + sorbet_type = if type.respond_to?(:sorbet_type) + type.sorbet_type + elsif type == ::JsonApiClient::Schema::Types::Integer + "::Integer" + elsif type == ::JsonApiClient::Schema::Types::String + "::String" + elsif type == ::JsonApiClient::Schema::Types::Float + "::Float" + elsif type == ::JsonApiClient::Schema::Types::Time + "::Time" + elsif type == ::JsonApiClient::Schema::Types::Decimal + "::BigDecimal" + elsif type == ::JsonApiClient::Schema::Types::Boolean + "T::Boolean" + else + "T.untyped" + end + + if property.default.nil? + as_nilable_type(sorbet_type) + else + sorbet_type + end + end + + sig do + params( + mod: RBI::Scope, + association: JsonApiClient::Associations::BaseAssociation, + ).void + end + def generate_methods_for_association(mod, association) + # If the association is broken, it will raise a NameError when trying to access the association_class + klass = association.association_class + + name, type = case association + when ::JsonApiClient::Associations::BelongsTo::Association + # id must be a string: # https://jsonapi.org/format/#document-resource-object-identification + [association.param.to_s, "T.nilable(::String)"] + when ::JsonApiClient::Associations::HasOne::Association + [association.attr_name.to_s, "T.nilable(#{klass})"] + when ::JsonApiClient::Associations::HasMany::Association + [association.attr_name.to_s, "T.nilable(T::Array[#{klass}])"] + else + return # Unsupported association type + end + + mod.create_method(name, return_type: type) + mod.create_method("#{name}=", parameters: [create_param(name, type: type)], return_type: type) + end + end + end + end +end diff --git a/manual/compiler_jsonapiclientresource.md b/manual/compiler_jsonapiclientresource.md new file mode 100644 index 000000000..5152a1889 --- /dev/null +++ b/manual/compiler_jsonapiclientresource.md @@ -0,0 +1,75 @@ +## JsonApiClientResource + +`Tapioca::Dsl::Compilers::JsonApiClientResource` generates RBI files for classes that inherit +[`JsonApiClient::Resource`](https://github.com/JsonApiClient/json_api_client). + +For example, with the following classes that inherits `JsonApiClient::Resource`: + +~~~rb +# user.rb +class User < JsonApiClient::Resource + has_many :posts + + property :name, type: :string + property :is_admin, type: :boolean, default: false +end + +# post.rb +class Post < JsonApiClient::Resource + belongs_to :user + + property :title, type: :string +end +~~~ + +this compiler will produce RBI files with the following content: + +~~~rbi +# user.rbi +# typed: strong + +class User + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T::Boolean) } + def is_admin; end + + sig { params(is_admin: T::Boolean).returns(T::Boolean) } + def is_admin=(is_admin); end + + sig { returns(T.nilable(::String)) } + def name; end + + sig { params(name: T.nilable(::String)).returns(T.nilable(::String)) } + def name=(name); end + + sig { returns(T.nilable(T::Array[Post])) } + def posts; end + + sig { params(posts: T.nilable(T::Array[Post])).returns(T.nilable(T::Array[Post])) } + def posts=(posts); end + end +end + +# post.rbi +# typed: strong + +class Post + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T.nilable(::String)) } + def title; end + + sig { params(title: T.nilable(::String)).returns(T.nilable(::String)) } + def title=(title); end + + sig { returns(T.nilable(::String)) } + def user_id; end + + sig { params(user_id: T.nilable(::String)).returns(T.nilable(::String)) } + def user_id=(user_id); end + end +end +~~~ diff --git a/manual/compilers.md b/manual/compilers.md index b879ba395..9ae482a9c 100644 --- a/manual/compilers.md +++ b/manual/compilers.md @@ -27,6 +27,7 @@ In the following section you will find all available DSL compilers: * [GraphqlInputObject](compiler_graphqlinputobject.md) * [GraphqlMutation](compiler_graphqlmutation.md) * [IdentityCache](compiler_identitycache.md) +* [JsonApiClientResource](compiler_jsonapiclientresource.md) * [Kredis](compiler_kredis.md) * [MixedInClassAttributes](compiler_mixedinclassattributes.md) * [Protobuf](compiler_protobuf.md) diff --git a/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi b/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi new file mode 100644 index 000000000..2acce94d4 --- /dev/null +++ b/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi @@ -0,0 +1,221 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-em_http` gem. +# Please instead update this file by running `bin/tapioca gem faraday-em_http`. + +# source://faraday-em_http//lib/faraday/adapter/em_http.rb#3 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# source://faraday-em_http//lib/faraday/adapter/em_http.rb#4 +class Faraday::Adapter + # source://faraday/1.10.3/lib/faraday/adapter.rb#33 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#60 + def call(env); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#55 + def close; end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#46 + def connection(env); end + + private + + # source://faraday/1.10.3/lib/faraday/adapter.rb#91 + def request_timeout(type, options); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#67 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil)); end +end + +# EventMachine adapter. This adapter is useful for either asynchronous +# requests when in an EM reactor loop, or for making parallel requests in +# synchronous code. +# +# source://faraday-em_http//lib/faraday/adapter/em_http.rb#8 +class Faraday::Adapter::EMHttp < ::Faraday::Adapter + include ::Faraday::Adapter::EMHttp::Options + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#116 + def call(env); end + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#190 + def create_request(env); end + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#196 + def error_message(client); end + + # @return [Boolean] + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#220 + def parallel?(env); end + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#122 + def perform_request(env); end + + # TODO: reuse the connection to support pipelining + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#168 + def perform_single_request(env); end + + # @raise [error_class] + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#200 + def raise_error(msg); end + + # @return [Boolean] + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#214 + def timeout_message?(msg); end + + class << self + # @return [Manager] + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#112 + def setup_parallel_manager(_options = T.unsafe(nil)); end + end +end + +# This parallel manager is designed to start an EventMachine loop +# and block until all registered requests have been completed. +# +# source://faraday-em_http//lib/faraday/adapter/em_http.rb#226 +class Faraday::Adapter::EMHttp::Manager + # @return [Manager] a new instance of Manager + # @see reset + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#228 + def initialize; end + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#246 + def add(&block); end + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#283 + def check_finished; end + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#271 + def perform_request; end + + # Re-initializes instance variables + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#233 + def reset; end + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#255 + def run; end + + # @return [Boolean] + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#242 + def running?; end +end + +# Options is a module containing helpers to convert the Faraday env object +# into options hashes for EMHTTP method calls. +# +# source://faraday-em_http//lib/faraday/adapter/em_http.rb#11 +module Faraday::Adapter::EMHttp::Options + # Reads out compression header settings from env into options + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#79 + def configure_compression(options, env); end + + # Reads out proxy settings from env into options + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#39 + def configure_proxy(options, env); end + + # Reads out host and port settings from env into options + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#51 + def configure_socket(options, env); end + + # Reads out SSL certificate settings from env into options + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#62 + def configure_ssl(options, env); end + + # Reads out timeout settings from env into options + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#72 + def configure_timeout(options, env); end + + # @return [Hash] + # + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#13 + def connection_config(env); end + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#33 + def read_body(env); end + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#22 + def request_config(env); end + + # source://faraday-em_http//lib/faraday/adapter/em_http.rb#86 + def request_options(env); end +end + +# Main Faraday::EmHttp module +# +# source://faraday-em_http//lib/faraday/em_http/version.rb#4 +module Faraday::EmHttp; end + +# source://faraday-em_http//lib/faraday/em_http/version.rb#5 +Faraday::EmHttp::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi b/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi new file mode 100644 index 000000000..9c89991f7 --- /dev/null +++ b/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi @@ -0,0 +1,125 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-em_synchrony` gem. +# Please instead update this file by running `bin/tapioca gem faraday-em_synchrony`. + +# source://faraday-em_synchrony//lib/faraday/adapter/em_synchrony.rb#5 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# source://faraday-em_synchrony//lib/faraday/adapter/em_synchrony.rb#6 +class Faraday::Adapter + # source://faraday/1.10.3/lib/faraday/adapter.rb#33 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#60 + def call(env); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#55 + def close; end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#46 + def connection(env); end + + private + + # source://faraday/1.10.3/lib/faraday/adapter.rb#91 + def request_timeout(type, options); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#67 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil)); end +end + +# EventMachine Synchrony adapter. +# +# source://faraday-em_synchrony//lib/faraday/adapter/em_synchrony.rb#8 +class Faraday::Adapter::EMSynchrony < ::Faraday::Adapter + include ::Faraday::Adapter::EMHttp::Options + + # source://faraday-em_synchrony//lib/faraday/adapter/em_synchrony.rb#40 + def call(env); end + + # source://faraday-em_synchrony//lib/faraday/adapter/em_synchrony.rb#82 + def create_request(env); end + + private + + # source://faraday-em_synchrony//lib/faraday/adapter/em_synchrony.rb#135 + def call_block(block); end + + # source://faraday-em_synchrony//lib/faraday/adapter/em_synchrony.rb#91 + def execute_parallel_request(env, request, http_method); end + + # source://faraday-em_synchrony//lib/faraday/adapter/em_synchrony.rb#112 + def execute_single_request(env, request, http_method); end + + class << self + # @return [ParallelManager] + # + # source://faraday-em_synchrony//lib/faraday/adapter/em_synchrony.rb#36 + def setup_parallel_manager(_options = T.unsafe(nil)); end + end +end + +# Main Faraday::EmSynchrony module +# +# source://faraday-em_synchrony//lib/faraday/em_synchrony/version.rb#4 +module Faraday::EmSynchrony; end + +# source://faraday-em_synchrony//lib/faraday/em_synchrony/version.rb#5 +Faraday::EmSynchrony::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday-excon@1.1.0.rbi b/sorbet/rbi/gems/faraday-excon@1.1.0.rbi new file mode 100644 index 000000000..1f8ec1dbd --- /dev/null +++ b/sorbet/rbi/gems/faraday-excon@1.1.0.rbi @@ -0,0 +1,135 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-excon` gem. +# Please instead update this file by running `bin/tapioca gem faraday-excon`. + +# source://faraday-excon//lib/faraday/adapter/excon.rb#3 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# source://faraday-excon//lib/faraday/adapter/excon.rb#4 +class Faraday::Adapter + # source://faraday/1.10.3/lib/faraday/adapter.rb#33 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#60 + def call(env); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#55 + def close; end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#46 + def connection(env); end + + private + + # source://faraday/1.10.3/lib/faraday/adapter.rb#91 + def request_timeout(type, options); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#67 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil)); end +end + +# Excon adapter. +# +# source://faraday-excon//lib/faraday/adapter/excon.rb#6 +class Faraday::Adapter::Excon < ::Faraday::Adapter + # source://faraday-excon//lib/faraday/adapter/excon.rb#9 + def build_connection(env); end + + # source://faraday-excon//lib/faraday/adapter/excon.rb#14 + def call(env); end + + # TODO: support streaming requests + # + # source://faraday-excon//lib/faraday/adapter/excon.rb#47 + def read_body(env); end + + private + + # source://faraday-excon//lib/faraday/adapter/excon.rb#108 + def amend_opts_with_proxy_settings!(opts, req); end + + # source://faraday-excon//lib/faraday/adapter/excon.rb#81 + def amend_opts_with_ssl!(opts, ssl); end + + # source://faraday-excon//lib/faraday/adapter/excon.rb#94 + def amend_opts_with_timeouts!(opts, req); end + + # @return [Boolean] + # + # source://faraday-excon//lib/faraday/adapter/excon.rb#65 + def needs_ssl_settings?(env); end + + # source://faraday-excon//lib/faraday/adapter/excon.rb#53 + def opts_from_env(env); end + + # source://faraday-excon//lib/faraday/adapter/excon.rb#112 + def proxy_settings_for_opts(proxy); end +end + +# source://faraday-excon//lib/faraday/adapter/excon.rb#69 +Faraday::Adapter::Excon::OPTS_KEYS = T.let(T.unsafe(nil), Array) + +# Main Faraday::Excon module +# +# source://faraday-excon//lib/faraday/excon/version.rb#4 +module Faraday::Excon; end + +# source://faraday-excon//lib/faraday/excon/version.rb#5 +Faraday::Excon::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi b/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi new file mode 100644 index 000000000..6fe9632b1 --- /dev/null +++ b/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi @@ -0,0 +1,144 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-httpclient` gem. +# Please instead update this file by running `bin/tapioca gem faraday-httpclient`. + +# source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#3 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#4 +class Faraday::Adapter + # source://faraday/1.10.3/lib/faraday/adapter.rb#33 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#60 + def call(env); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#55 + def close; end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#46 + def connection(env); end + + private + + # source://faraday/1.10.3/lib/faraday/adapter.rb#91 + def request_timeout(type, options); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#67 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil)); end +end + +# This class provides the main implementation for your adapter. +# There are some key responsibilities that your adapter should satisfy: +# * Initialize and store internally the client you chose (e.g. Net::HTTP) +# * Process requests and save the response (see `#call`) +# +# source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#9 +class Faraday::Adapter::HTTPClient < ::Faraday::Adapter + # source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#12 + def build_connection(env); end + + # source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#39 + def call(env); end + + # source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#124 + def configure_client(client); end + + # Configure proxy URI and any user credentials. + # + # @param proxy [Hash] + # + # source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#89 + def configure_proxy(client, proxy); end + + # @param bind [Hash] + # + # source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#81 + def configure_socket(client, bind); end + + # @param ssl [Hash] + # + # source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#97 + def configure_ssl(client, ssl); end + + # @param req [Hash] + # + # source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#110 + def configure_timeouts(client, req); end + + # @param ssl [Hash] + # @return [OpenSSL::X509::Store] + # + # source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#130 + def ssl_cert_store(ssl); end + + # @param ssl [Hash] + # + # source://faraday-httpclient//lib/faraday/adapter/httpclient.rb#142 + def ssl_verify_mode(ssl); end +end + +# Main Faraday::HTTPClient module +# +# source://faraday-httpclient//lib/faraday/httpclient/version.rb#4 +module Faraday::HTTPClient; end + +# source://faraday-httpclient//lib/faraday/httpclient/version.rb#5 +Faraday::HTTPClient::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi b/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi new file mode 100644 index 000000000..b0231d68f --- /dev/null +++ b/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi @@ -0,0 +1,258 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-multipart` gem. +# Please instead update this file by running `bin/tapioca gem faraday-multipart`. + +# source://faraday-multipart//lib/faraday/multipart/version.rb#3 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# source://faraday-multipart//lib/faraday/multipart.rb#18 +Faraday::CompositeReadIO = Faraday::Multipart::CompositeReadIO + +# Aliases for Faraday v1, these are all deprecated and will be removed in v2 of this middleware +# +# source://faraday-multipart//lib/faraday/multipart.rb#15 +Faraday::FilePart = Multipart::Post::UploadIO + +# Main Faraday::Multipart module. +# +# source://faraday-multipart//lib/faraday/multipart/version.rb#5 +module Faraday::Multipart + class << self + # source://faraday-multipart//lib/faraday/multipart/version.rb#8 + def multipart_post_version; end + end +end + +# Similar to, but not compatible with CompositeReadIO provided by the +# multipart-post gem. +# https://github.com/nicksieger/multipart-post/blob/master/lib/composite_io.rb +# +# source://faraday-multipart//lib/faraday/multipart/file_part.rb#67 +class Faraday::Multipart::CompositeReadIO + # @return [CompositeReadIO] a new instance of CompositeReadIO + # + # source://faraday-multipart//lib/faraday/multipart/file_part.rb#68 + def initialize(*parts); end + + # Close each of the IOs. + # + # @return [void] + # + # source://faraday-multipart//lib/faraday/multipart/file_part.rb#111 + def close; end + + # source://faraday-multipart//lib/faraday/multipart/file_part.rb#115 + def ensure_open_and_readable; end + + # @return [Integer] sum of the lengths of all the parts + # + # source://faraday-multipart//lib/faraday/multipart/file_part.rb#75 + def length; end + + # Read from IOs in order until `length` bytes have been received. + # + # @param length [Integer, nil] + # @param outbuf [String, nil] + # + # source://faraday-multipart//lib/faraday/multipart/file_part.rb#91 + def read(length = T.unsafe(nil), outbuf = T.unsafe(nil)); end + + # Rewind each of the IOs and reset the index to 0. + # + # @return [void] + # + # source://faraday-multipart//lib/faraday/multipart/file_part.rb#82 + def rewind; end + + private + + # source://faraday-multipart//lib/faraday/multipart/file_part.rb#125 + def advance_io; end + + # source://faraday-multipart//lib/faraday/multipart/file_part.rb#121 + def current_io; end +end + +# source://faraday-multipart//lib/faraday/multipart/file_part.rb#55 +Faraday::Multipart::FilePart = Multipart::Post::UploadIO + +# Middleware for supporting multi-part requests. +# +# source://faraday-multipart//lib/faraday/multipart/middleware.rb#8 +class Faraday::Multipart::Middleware < ::Faraday::Request::UrlEncoded + # @return [Middleware] a new instance of Middleware + # + # source://faraday-multipart//lib/faraday/multipart/middleware.rb#13 + def initialize(app = T.unsafe(nil), options = T.unsafe(nil)); end + + # Checks for files in the payload, otherwise leaves everything untouched. + # + # @param env [Faraday::Env] + # + # source://faraday-multipart//lib/faraday/multipart/middleware.rb#21 + def call(env); end + + # @param env [Faraday::Env] + # @param params [Hash] + # + # source://faraday-multipart//lib/faraday/multipart/middleware.rb#55 + def create_multipart(env, params); end + + # Returns true if obj is an enumerable with values that are multipart. + # + # @param obj [Object] + # @return [Boolean] + # + # source://faraday-multipart//lib/faraday/multipart/middleware.rb#44 + def has_multipart?(obj); end + + # source://faraday-multipart//lib/faraday/multipart/middleware.rb#67 + def part(boundary, key, value); end + + # @param params [Hash] + # @param prefix [String] + # @param pieces [Array] + # + # source://faraday-multipart//lib/faraday/multipart/middleware.rb#83 + def process_params(params, prefix = T.unsafe(nil), pieces = T.unsafe(nil), &block); end + + # @param env [Faraday::Env] + # @return [Boolean] + # + # source://faraday-multipart//lib/faraday/multipart/middleware.rb#32 + def process_request?(env); end + + # @return [String] + # + # source://faraday-multipart//lib/faraday/multipart/middleware.rb#76 + def unique_boundary; end +end + +# source://faraday-multipart//lib/faraday/multipart/middleware.rb#9 +Faraday::Multipart::Middleware::DEFAULT_BOUNDARY_PREFIX = T.let(T.unsafe(nil), String) + +# Multipart value used to POST data with a content type. +# +# source://faraday-multipart//lib/faraday/multipart/param_part.rb#6 +class Faraday::Multipart::ParamPart + # @param value [String] Uploaded content as a String. + # @param content_type [String] String content type of the value. + # @param content_id [String] Optional String of this value's Content-ID. + # @return [Faraday::ParamPart] + # + # source://faraday-multipart//lib/faraday/multipart/param_part.rb#12 + def initialize(value, content_type, content_id = T.unsafe(nil)); end + + # The value's content ID, if given. + # + # @return [String, nil] + # + # source://faraday-multipart//lib/faraday/multipart/param_part.rb#52 + def content_id; end + + # The value's content type. + # + # @return [String] + # + # source://faraday-multipart//lib/faraday/multipart/param_part.rb#47 + def content_type; end + + # Returns a Hash of String key/value pairs. + # + # @return [Hash] + # + # source://faraday-multipart//lib/faraday/multipart/param_part.rb#32 + def headers; end + + # Converts this value to a form part. + # + # @param boundary [String] String multipart boundary that must not exist in + # the content exactly. + # @param key [String] String key name for this value. + # @return [Faraday::Parts::Part] + # + # source://faraday-multipart//lib/faraday/multipart/param_part.rb#25 + def to_part(boundary, key); end + + # The content to upload. + # + # @return [String] + # + # source://faraday-multipart//lib/faraday/multipart/param_part.rb#42 + def value; end +end + +# source://faraday-multipart//lib/faraday/multipart/file_part.rb#56 +Faraday::Multipart::Parts = Multipart::Post::Parts + +# source://faraday-multipart//lib/faraday/multipart/version.rb#6 +Faraday::Multipart::VERSION = T.let(T.unsafe(nil), String) + +# source://faraday-multipart//lib/faraday/multipart.rb#16 +Faraday::ParamPart = Faraday::Multipart::ParamPart + +# source://faraday-multipart//lib/faraday/multipart.rb#17 +Faraday::Parts = Multipart::Post::Parts + +# multipart-post v2.2.0 introduces a new class hierarchy for classes like Parts and UploadIO +# For backwards compatibility, detect the gem version and use the right class +# +# source://faraday-multipart//lib/faraday/multipart.rb#21 +Faraday::UploadIO = Multipart::Post::UploadIO diff --git a/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi b/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi new file mode 100644 index 000000000..c2530b6fd --- /dev/null +++ b/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi @@ -0,0 +1,141 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-net_http` gem. +# Please instead update this file by running `bin/tapioca gem faraday-net_http`. + +# source://faraday-net_http//lib/faraday/adapter/net_http.rb#12 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# source://faraday-net_http//lib/faraday/adapter/net_http.rb#13 +class Faraday::Adapter + # source://faraday/1.10.3/lib/faraday/adapter.rb#33 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#60 + def call(env); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#55 + def close; end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#46 + def connection(env); end + + private + + # source://faraday/1.10.3/lib/faraday/adapter.rb#91 + def request_timeout(type, options); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#67 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil)); end +end + +# source://faraday-net_http//lib/faraday/adapter/net_http.rb#14 +class Faraday::Adapter::NetHttp < ::Faraday::Adapter + # @return [NetHttp] a new instance of NetHttp + # + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#37 + def initialize(app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#42 + def build_connection(env); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#62 + def call(env); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#50 + def net_http_connection(env); end + + private + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#173 + def configure_request(http, req); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#157 + def configure_ssl(http, ssl); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#89 + def create_request(env); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#105 + def perform_request(http, env); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#135 + def request_via_get_method(http, env, &block); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#143 + def request_via_request_method(http, env, &block); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#126 + def request_with_wrapped_block(http, env, &block); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#193 + def ssl_cert_store(ssl); end + + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#202 + def ssl_verify_mode(ssl); end +end + +# source://faraday-net_http//lib/faraday/adapter/net_http.rb#35 +Faraday::Adapter::NetHttp::NET_HTTP_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://faraday-net_http//lib/faraday/net_http/version.rb#4 +module Faraday::NetHttp; end + +# source://faraday-net_http//lib/faraday/net_http/version.rb#5 +Faraday::NetHttp::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi b/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi new file mode 100644 index 000000000..218e62bc2 --- /dev/null +++ b/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi @@ -0,0 +1,117 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-net_http_persistent` gem. +# Please instead update this file by running `bin/tapioca gem faraday-net_http_persistent`. + +# source://faraday-net_http_persistent//lib/faraday/adapter/net_http_persistent.rb#3 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# source://faraday-net_http_persistent//lib/faraday/adapter/net_http_persistent.rb#4 +class Faraday::Adapter + # source://faraday/1.10.3/lib/faraday/adapter.rb#33 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#60 + def call(env); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#55 + def close; end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#46 + def connection(env); end + + private + + # source://faraday/1.10.3/lib/faraday/adapter.rb#91 + def request_timeout(type, options); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#67 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil)); end +end + +# Net::HTTP::Persistent adapter. +# +# source://faraday-net_http_persistent//lib/faraday/adapter/net_http_persistent.rb#6 +class Faraday::Adapter::NetHttpPersistent < ::Faraday::Adapter::NetHttp + private + + # source://faraday-net_http_persistent//lib/faraday/adapter/net_http_persistent.rb#94 + def configure_ssl(http, ssl); end + + # source://faraday-net_http_persistent//lib/faraday/adapter/net_http_persistent.rb#105 + def http_set(http, attr, value); end + + # source://faraday-net_http_persistent//lib/faraday/adapter/net_http_persistent.rb#11 + def net_http_connection(env); end + + # source://faraday-net_http_persistent//lib/faraday/adapter/net_http_persistent.rb#52 + def perform_request(http, env); end + + # source://faraday-net_http_persistent//lib/faraday/adapter/net_http_persistent.rb#31 + def proxy_uri(env); end +end + +# source://faraday-net_http_persistent//lib/faraday/adapter/net_http_persistent.rb#85 +Faraday::Adapter::NetHttpPersistent::SSL_CONFIGURATIONS = T.let(T.unsafe(nil), Hash) + +# source://faraday-net_http_persistent//lib/faraday/net_http_persistent/version.rb#4 +module Faraday::NetHttpPersistent; end + +# source://faraday-net_http_persistent//lib/faraday/net_http_persistent/version.rb#5 +Faraday::NetHttpPersistent::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday-patron@1.0.0.rbi b/sorbet/rbi/gems/faraday-patron@1.0.0.rbi new file mode 100644 index 000000000..c71c1f05d --- /dev/null +++ b/sorbet/rbi/gems/faraday-patron@1.0.0.rbi @@ -0,0 +1,124 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-patron` gem. +# Please instead update this file by running `bin/tapioca gem faraday-patron`. + +# source://faraday-patron//lib/faraday/adapter/patron.rb#3 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# source://faraday-patron//lib/faraday/adapter/patron.rb#4 +class Faraday::Adapter + # source://faraday/1.10.3/lib/faraday/adapter.rb#33 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#60 + def call(env); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#55 + def close; end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#46 + def connection(env); end + + private + + # source://faraday/1.10.3/lib/faraday/adapter.rb#91 + def request_timeout(type, options); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#67 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil)); end +end + +# Patron adapter +# +# source://faraday-patron//lib/faraday/adapter/patron.rb#6 +class Faraday::Adapter::Patron < ::Faraday::Adapter + # source://faraday-patron//lib/faraday/adapter/patron.rb#9 + def build_connection(env); end + + # source://faraday-patron//lib/faraday/adapter/patron.rb#24 + def call(env); end + + # source://faraday-patron//lib/faraday/adapter/patron.rb#101 + def configure_proxy(session, proxy); end + + # source://faraday-patron//lib/faraday/adapter/patron.rb#81 + def configure_ssl(session, ssl); end + + # source://faraday-patron//lib/faraday/adapter/patron.rb#89 + def configure_timeouts(session, req); end + + private + + # @return [Boolean] + # + # source://faraday-patron//lib/faraday/adapter/patron.rb#125 + def connection_timed_out_message?(message); end +end + +# source://faraday-patron//lib/faraday/adapter/patron.rb#114 +Faraday::Adapter::Patron::CURL_TIMEOUT_MESSAGES = T.let(T.unsafe(nil), Array) + +# Main Faraday::Patron module +# +# source://faraday-patron//lib/faraday/patron/version.rb#4 +module Faraday::Patron; end + +# source://faraday-patron//lib/faraday/patron/version.rb#5 +Faraday::Patron::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday-rack@1.0.0.rbi b/sorbet/rbi/gems/faraday-rack@1.0.0.rbi new file mode 100644 index 000000000..8fbc85d10 --- /dev/null +++ b/sorbet/rbi/gems/faraday-rack@1.0.0.rbi @@ -0,0 +1,132 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-rack` gem. +# Please instead update this file by running `bin/tapioca gem faraday-rack`. + +# source://faraday-rack//lib/faraday/adapter/rack.rb#3 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# source://faraday-rack//lib/faraday/adapter/rack.rb#4 +class Faraday::Adapter + # source://faraday/1.10.3/lib/faraday/adapter.rb#33 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#60 + def call(env); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#55 + def close; end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#46 + def connection(env); end + + private + + # source://faraday/1.10.3/lib/faraday/adapter.rb#91 + def request_timeout(type, options); end + + # source://faraday/1.10.3/lib/faraday/adapter.rb#67 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil)); end +end + +# Sends requests to a Rack app. +# +# @example +# +# class MyRackApp +# def call(env) +# [200, {'Content-Type' => 'text/html'}, ["hello world"]] +# end +# end +# +# Faraday.new do |conn| +# conn.adapter :rack, MyRackApp.new +# end +# +# source://faraday-rack//lib/faraday/adapter/rack.rb#18 +class Faraday::Adapter::Rack < ::Faraday::Adapter + # @return [Rack] a new instance of Rack + # + # source://faraday-rack//lib/faraday/adapter/rack.rb#24 + def initialize(faraday_app, rack_app); end + + # source://faraday-rack//lib/faraday/adapter/rack.rb#30 + def call(env); end + + private + + # source://faraday-rack//lib/faraday/adapter/rack.rb#66 + def build_rack_env(env); end + + # source://faraday-rack//lib/faraday/adapter/rack.rb#62 + def execute_request(env, rack_env); end +end + +# not prefixed with "HTTP_" +# +# source://faraday-rack//lib/faraday/adapter/rack.rb#22 +Faraday::Adapter::Rack::SPECIAL_HEADERS = T.let(T.unsafe(nil), Array) + +# Main Faraday::Rack module +# +# source://faraday-rack//lib/faraday/rack/version.rb#4 +module Faraday::Rack; end + +# source://faraday-rack//lib/faraday/rack/version.rb#5 +Faraday::Rack::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday-retry@1.0.3.rbi b/sorbet/rbi/gems/faraday-retry@1.0.3.rbi new file mode 100644 index 000000000..c56692fa0 --- /dev/null +++ b/sorbet/rbi/gems/faraday-retry@1.0.3.rbi @@ -0,0 +1,197 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday-retry` gem. +# Please instead update this file by running `bin/tapioca gem faraday-retry`. + +# Faraday namespace. +# +# source://faraday-retry//lib/faraday/retriable_response.rb#4 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# Exception used to control the Retry middleware. +# +# source://faraday-retry//lib/faraday/retriable_response.rb#6 +class Faraday::RetriableResponse < ::Faraday::Error; end + +# Middleware main module. +# +# source://faraday-retry//lib/faraday/retry/middleware.rb#4 +module Faraday::Retry; end + +# This class provides the main implementation for your middleware. +# Your middleware can implement any of the following methods: +# * on_request - called when the request is being prepared +# * on_complete - called when the response is being processed +# +# Optionally, you can also override the following methods from Faraday::Middleware +# * initialize(app, options = {}) - the initializer method +# * call(env) - the main middleware invocation method. +# This already calls on_request and on_complete, so you normally don't need to override it. +# You may need to in case you need to "wrap" the request or need more control +# (see "retry" middleware: https://github.com/lostisland/faraday/blob/main/lib/faraday/request/retry.rb#L142). +# IMPORTANT: Remember to call `@app.call(env)` or `super` to not interrupt the middleware chain! +# +# source://faraday-retry//lib/faraday/retry/middleware.rb#17 +class Faraday::Retry::Middleware < ::Faraday::Middleware + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param app [#call] + # @param options [Hash] + # @return [Middleware] a new instance of Middleware + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#114 + def initialize(app, options = T.unsafe(nil)); end + + # An exception matcher for the rescue clause can usually be any object + # that responds to `===`, but for Ruby 1.8 it has to be a Class or Module. + # + # @api private + # @param exceptions [Array] + # @return [Module] an exception matcher + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#166 + def build_exception_matcher(exceptions); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#120 + def calculate_sleep_amount(retries, env); end + + # @param env [Faraday::Env] + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#134 + def call(env); end + + private + + # MDN spec for Retry-After header: + # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#203 + def calculate_retry_after(env); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#218 + def calculate_retry_interval(retries); end + + # @return [Boolean] + # + # source://faraday-retry//lib/faraday/retry/middleware.rb#187 + def retry_request?(env, exception); end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#192 + def rewind_files(body); end +end + +# source://faraday-retry//lib/faraday/retry/middleware.rb#18 +Faraday::Retry::Middleware::DEFAULT_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://faraday-retry//lib/faraday/retry/middleware.rb#22 +Faraday::Retry::Middleware::IDEMPOTENT_METHODS = T.let(T.unsafe(nil), Array) + +# Options contains the configurable parameters for the Retry middleware. +# +# source://faraday-retry//lib/faraday/retry/middleware.rb#29 +class Faraday::Retry::Middleware::Options < ::Faraday::Options + # source://faraday-retry//lib/faraday/retry/middleware.rb#57 + def backoff_factor; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#61 + def exceptions; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#45 + def interval; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#53 + def interval_randomness; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#41 + def max; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#49 + def max_interval; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#65 + def methods; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#73 + def retry_block; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#69 + def retry_if; end + + # source://faraday-retry//lib/faraday/retry/middleware.rb#77 + def retry_statuses; end + + class << self + # source://faraday-retry//lib/faraday/retry/middleware.rb#33 + def from(value); end + end +end + +# source://faraday-retry//lib/faraday/retry/middleware.rb#31 +Faraday::Retry::Middleware::Options::DEFAULT_CHECK = T.let(T.unsafe(nil), Proc) + +# source://faraday-retry//lib/faraday/retry/version.rb#5 +Faraday::Retry::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday@1.10.3.rbi b/sorbet/rbi/gems/faraday@1.10.3.rbi new file mode 100644 index 000000000..98522a351 --- /dev/null +++ b/sorbet/rbi/gems/faraday@1.10.3.rbi @@ -0,0 +1,2728 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday` gem. +# Please instead update this file by running `bin/tapioca gem faraday`. + +# This is the main namespace for Faraday. +# +# It provides methods to create {Connection} objects, and HTTP-related +# methods to use directly. +# +# @example Helpful class methods for easy usage +# Faraday.get "http://faraday.com" +# @example Helpful class method `.new` to create {Connection} objects. +# conn = Faraday.new "http://faraday.com" +# conn.get '/' +# +# source://faraday//lib/faraday/middleware_registry.rb#5 +module Faraday + class << self + # @overload default_adapter + # @overload default_adapter= + # + # source://faraday//lib/faraday.rb#81 + def default_adapter; end + + # Documented elsewhere, see default_adapter reader + # + # source://faraday//lib/faraday.rb#137 + def default_adapter=(adapter); end + + # @overload default_connection + # @overload default_connection= + # + # source://faraday//lib/faraday.rb#155 + def default_connection; end + + # Documented below, see default_connection + # + # source://faraday//lib/faraday.rb#84 + def default_connection=(_arg0); end + + # Gets the default connection options used when calling {Faraday#new}. + # + # @return [Faraday::ConnectionOptions] + # + # source://faraday//lib/faraday.rb#162 + def default_connection_options; end + + # Sets the default options used when calling {Faraday#new}. + # + # @param options [Hash, Faraday::ConnectionOptions] + # + # source://faraday//lib/faraday.rb#169 + def default_connection_options=(options); end + + # Tells Faraday to ignore the environment proxy (http_proxy). + # Defaults to `false`. + # + # @return [Boolean] + # + # source://faraday//lib/faraday.rb#89 + def ignore_env_proxy; end + + # Tells Faraday to ignore the environment proxy (http_proxy). + # Defaults to `false`. + # + # @return [Boolean] + # + # source://faraday//lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # Gets or sets the path that the Faraday libs are loaded from. + # + # @return [String] + # + # source://faraday//lib/faraday.rb#72 + def lib_path; end + + # Gets or sets the path that the Faraday libs are loaded from. + # + # @return [String] + # + # source://faraday//lib/faraday.rb#72 + def lib_path=(_arg0); end + + # Initializes a new {Connection}. + # + # @example With an URL argument + # Faraday.new 'http://faraday.com' + # # => Faraday::Connection to http://faraday.com + # @example With everything in an options hash + # Faraday.new url: 'http://faraday.com', + # params: { page: 1 } + # # => Faraday::Connection to http://faraday.com?page=1 + # @example With an URL argument and an options hash + # Faraday.new 'http://faraday.com', params: { page: 1 } + # # => Faraday::Connection to http://faraday.com?page=1 + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param url [String, Hash] The optional String base URL to use as a prefix + # for all requests. Can also be the options Hash. Any of these + # values will be set on every request made, unless overridden + # for a specific request. + # @param options [Hash] + # @return [Faraday::Connection] + # + # source://faraday//lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Internal: Requires internal Faraday libraries. + # + # @param libs [Array] one or more relative String names to Faraday classes. + # @private + # @return [void] + # + # source://faraday//lib/faraday.rb#128 + def require_lib(*libs); end + + # Internal: Requires internal Faraday libraries. + # + # @param libs [Array] one or more relative String names to Faraday classes. + # @private + # @return [void] + # + # source://faraday//lib/faraday.rb#128 + def require_libs(*libs); end + + # @return [Boolean] + # + # source://faraday//lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # The root path that Faraday is being loaded from. + # + # This is the root from where the libraries are auto-loaded. + # + # @return [String] + # + # source://faraday//lib/faraday.rb#68 + def root_path; end + + # The root path that Faraday is being loaded from. + # + # This is the root from where the libraries are auto-loaded. + # + # @return [String] + # + # source://faraday//lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # Internal: Proxies method calls on the Faraday constant to + # .default_connection. + # + # source://faraday//lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# Adapter is the base class for all Faraday adapters. +# +# @see lib/faraday/adapter.rb Original class location +# +# source://faraday//lib/faraday/adapter.rb#6 +class Faraday::Adapter + extend ::Faraday::MiddlewareRegistry + extend ::Faraday::DependencyLoader + extend ::Faraday::Adapter::Parallelism + extend ::Faraday::AutoloadHelper + + # @return [Adapter] a new instance of Adapter + # + # source://faraday//lib/faraday/adapter.rb#33 + def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/adapter.rb#60 + def call(env); end + + # Close any persistent connections. The adapter should still be usable + # after calling close. + # + # source://faraday//lib/faraday/adapter.rb#55 + def close; end + + # Yields or returns an adapter's configured connection. Depends on + # #build_connection being defined on this adapter. + # + # @param env [Faraday::Env, Hash] The env object for a faraday request. + # @return The return value of the given block, or the HTTP connection object + # if no block is given. + # @yield [conn] + # + # source://faraday//lib/faraday/adapter.rb#46 + def connection(env); end + + private + + # Fetches either a read, write, or open timeout setting. Defaults to the + # :timeout value if a more specific one is not given. + # + # @param type [Symbol] Describes which timeout setting to get: :read, + # :write, or :open. + # @param options [Hash] Hash containing Symbol keys like :timeout, + # :read_timeout, :write_timeout, :open_timeout, or + # :timeout + # @return [Integer, nil] Timeout duration in seconds, or nil if no timeout + # has been set. + # + # source://faraday//lib/faraday/adapter.rb#91 + def request_timeout(type, options); end + + # source://faraday//lib/faraday/adapter.rb#67 + def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil)); end +end + +# source://faraday//lib/faraday/adapter.rb#10 +Faraday::Adapter::CONTENT_LENGTH = T.let(T.unsafe(nil), String) + +# This module marks an Adapter as supporting parallel requests. +# +# source://faraday//lib/faraday/adapter.rb#17 +module Faraday::Adapter::Parallelism + # source://faraday//lib/faraday/adapter.rb#24 + def inherited(subclass); end + + # Sets the attribute supports_parallel + # + # @param value the value to set the attribute supports_parallel to. + # + # source://faraday//lib/faraday/adapter.rb#18 + def supports_parallel=(_arg0); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter.rb#20 + def supports_parallel?; end +end + +# source://faraday//lib/faraday/adapter.rb#99 +Faraday::Adapter::TIMEOUT_KEYS = T.let(T.unsafe(nil), Hash) + +# @example +# test = Faraday::Connection.new do +# use Faraday::Adapter::Test do |stub| +# # Define matcher to match the request +# stub.get '/resource.json' do +# # return static content +# [200, {'Content-Type' => 'application/json'}, 'hi world'] +# end +# +# # response with content generated based on request +# stub.get '/showget' do |env| +# [200, {'Content-Type' => 'text/plain'}, env[:method].to_s] +# end +# +# # A regular expression can be used as matching filter +# stub.get /\A\/items\/(\d+)\z/ do |env, meta| +# # in case regular expression is used, an instance of MatchData +# # can be received +# [200, +# {'Content-Type' => 'text/plain'}, +# "showing item: #{meta[:match_data][1]}" +# ] +# end +# +# # You can set strict_mode to exactly match the stubbed requests. +# stub.strict_mode = true +# end +# end +# +# resp = test.get '/resource.json' +# resp.body # => 'hi world' +# +# resp = test.get '/showget' +# resp.body # => 'get' +# +# resp = test.get '/items/1' +# resp.body # => 'showing item: 1' +# +# resp = test.get '/items/2' +# resp.body # => 'showing item: 2' +# +# source://faraday//lib/faraday/adapter/test.rb#45 +class Faraday::Adapter::Test < ::Faraday::Adapter + # @return [Test] a new instance of Test + # + # source://faraday//lib/faraday/adapter/test.rb#226 + def initialize(app, stubs = T.unsafe(nil), &block); end + + # @param env [Faraday::Env] + # + # source://faraday//lib/faraday/adapter/test.rb#237 + def call(env); end + + # @yield [stubs] + # + # source://faraday//lib/faraday/adapter/test.rb#232 + def configure; end + + # Returns the value of attribute stubs. + # + # source://faraday//lib/faraday/adapter/test.rb#46 + def stubs; end + + # Sets the attribute stubs + # + # @param value the value to set the attribute stubs to. + # + # source://faraday//lib/faraday/adapter/test.rb#46 + def stubs=(_arg0); end +end + +# Stub request +# +# source://faraday//lib/faraday/adapter/test.rb#167 +class Faraday::Adapter::Test::Stub < ::Struct + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#206 + def headers_match?(request_headers); end + + # @param env [Faraday::Env] + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#168 + def matches?(env); end + + # @param env [Faraday::Env] + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#193 + def params_match?(env); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#184 + def path_match?(request_path, meta); end + + # source://faraday//lib/faraday/adapter/test.rb#221 + def to_s; end +end + +# A stack of Stubs +# +# source://faraday//lib/faraday/adapter/test.rb#49 +class Faraday::Adapter::Test::Stubs + # @return [Stubs] a new instance of Stubs + # @yield [_self] + # @yieldparam _self [Faraday::Adapter::Test::Stubs] the object that the method was called on + # + # source://faraday//lib/faraday/adapter/test.rb#53 + def initialize(strict_mode: T.unsafe(nil)); end + + # source://faraday//lib/faraday/adapter/test.rb#101 + def delete(path, headers = T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#61 + def empty?; end + + # source://faraday//lib/faraday/adapter/test.rb#81 + def get(path, headers = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/adapter/test.rb#85 + def head(path, headers = T.unsafe(nil), &block); end + + # @param env [Faraday::Env] + # + # source://faraday//lib/faraday/adapter/test.rb#66 + def match(env); end + + # source://faraday//lib/faraday/adapter/test.rb#105 + def options(path, headers = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/adapter/test.rb#97 + def patch(path, body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/adapter/test.rb#89 + def post(path, body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/adapter/test.rb#93 + def put(path, body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # Set strict_mode. If the value is true, this adapter tries to find matched requests strictly, + # which means that all of a path, parameters, and headers must be the same as an actual request. + # + # source://faraday//lib/faraday/adapter/test.rb#126 + def strict_mode=(value); end + + # Raises an error if any of the stubbed calls have not been made. + # + # source://faraday//lib/faraday/adapter/test.rb#110 + def verify_stubbed_calls; end + + protected + + # @param stack [Hash] + # @param env [Faraday::Env] + # @return [Boolean] + # + # source://faraday//lib/faraday/adapter/test.rb#156 + def matches?(stack, env); end + + # source://faraday//lib/faraday/adapter/test.rb#137 + def new_stub(request_method, path, headers = T.unsafe(nil), body = T.unsafe(nil), &block); end +end + +# source://faraday//lib/faraday/adapter/test.rb#50 +class Faraday::Adapter::Test::Stubs::NotFound < ::StandardError; end + +# Typhoeus adapter. This class is just a stub, the real adapter is in +# https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/adapters/faraday.rb +# +# source://faraday//lib/faraday/adapter/typhoeus.rb#7 +class Faraday::Adapter::Typhoeus < ::Faraday::Adapter + # Needs to define this method in order to support Typhoeus <= 1.3.0 + # + # source://faraday//lib/faraday/adapter/typhoeus.rb#9 + def call; end +end + +# AdapterRegistry registers adapter class names so they can be looked up by a +# String or Symbol name. +# +# source://faraday//lib/faraday/adapter_registry.rb#8 +class Faraday::AdapterRegistry + # @return [AdapterRegistry] a new instance of AdapterRegistry + # + # source://faraday//lib/faraday/adapter_registry.rb#9 + def initialize; end + + # source://faraday//lib/faraday/adapter_registry.rb#14 + def get(name); end + + # source://faraday//lib/faraday/adapter_registry.rb#23 + def set(klass, name = T.unsafe(nil)); end +end + +# Adds the ability for other modules to manage autoloadable +# constants. +# +# @api private +# +# source://faraday//lib/faraday/autoload.rb#8 +module Faraday::AutoloadHelper + # Filters the module's contents with those that have been already + # autoloaded. + # + # @api private + # @return [Array] + # + # source://faraday//lib/faraday/autoload.rb#49 + def all_loaded_constants; end + + # Registers the constants to be auto loaded. + # + # @api private + # @example + # + # Faraday.autoload_all 'faraday/foo', + # Bar: 'bar' + # + # # requires faraday/foo/bar to load Faraday::Bar. + # Faraday::Bar + # @param prefix [String] The require prefix. If the path is inside Faraday, + # then it will be prefixed with the root path of this loaded + # Faraday version. + # @param options [{ Symbol => String }] library names. + # @return [void] + # + # source://faraday//lib/faraday/autoload.rb#25 + def autoload_all(prefix, options); end + + # Loads each autoloaded constant. If thread safety is a concern, + # wrap this in a Mutex. + # + # @api private + # @return [void] + # + # source://faraday//lib/faraday/autoload.rb#39 + def load_autoloaded_constants; end +end + +# Raised by Faraday::Response::RaiseError in case of a 400 response. +# +# source://faraday//lib/faraday/error.rb#89 +class Faraday::BadRequestError < ::Faraday::ClientError; end + +# source://faraday//lib/faraday.rb#60 +Faraday::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# Faraday client error class. Represents 4xx status responses. +# +# source://faraday//lib/faraday/error.rb#85 +class Faraday::ClientError < ::Faraday::Error; end + +# Raised by Faraday::Response::RaiseError in case of a 409 response. +# +# source://faraday//lib/faraday/error.rb#109 +class Faraday::ConflictError < ::Faraday::ClientError; end + +# Connection objects manage the default properties and the middleware +# stack for fulfilling an HTTP request. +# +# @example +# +# conn = Faraday::Connection.new 'http://sushi.com' +# +# # GET http://sushi.com/nigiri +# conn.get 'nigiri' +# # => # +# +# source://faraday//lib/faraday/connection.rb#17 +class Faraday::Connection + extend ::Forwardable + extend ::Faraday::Deprecate + + # Initializes a new Faraday::Connection. + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param url [URI, String] URI or String base URL to use as a prefix for all + # requests (optional). + # @param options [Hash, Faraday::ConnectionOptions] + # @return [Connection] a new instance of Connection + # @yield [self] after all setup has been done + # + # source://faraday//lib/faraday/connection.rb#65 + def initialize(url = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://faraday//lib/faraday/connection.rb#348 + def _deprecated_authorization(type, token); end + + # source://faraday//lib/faraday/connection.rb#301 + def _deprecated_basic_auth(login, pass); end + + # source://faraday//lib/faraday/connection.rb#321 + def _deprecated_token_auth(token, options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def adapter(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def app(*args, **_arg1, &block); end + + # Sets up a custom Authorization header. + # + # @example + # + # conn.authorization :Bearer, 'mF_9.B5f-4.1JqM' + # conn.headers['Authorization'] + # # => "Bearer mF_9.B5f-4.1JqM" + # + # conn.authorization :Token, token: 'abcdef', foo: 'bar' + # conn.headers['Authorization'] + # # => "Token token=\"abcdef\", + # foo=\"bar\"" + # @param type [String] authorization type + # @param token [String, Hash] token. A String value is taken literally, and + # a Hash is encoded into comma-separated key/value pairs. + # @return [void] + # + # source://faraday//lib/faraday/deprecate.rb#86 + def authorization(*args, &block); end + + # Sets up the Authorization header with these credentials, encoded + # with base64. + # + # @example + # + # conn.basic_auth 'Aladdin', 'open sesame' + # conn.headers['Authorization'] + # # => "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" + # @param login [String] The authentication login. + # @param pass [String] The authentication password. + # @return [void] + # + # source://faraday//lib/faraday/deprecate.rb#86 + def basic_auth(*args, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def build(*args, **_arg1, &block); end + + # Build an absolute URL based on url_prefix. + # + # of the resulting url (default: nil). + # + # @param url [String, URI] + # @param params [Faraday::Utils::ParamsHash] A Faraday::Utils::ParamsHash to + # replace the query values + # @return [URI] + # + # source://faraday//lib/faraday/connection.rb#542 + def build_exclusive_url(url = T.unsafe(nil), params = T.unsafe(nil), params_encoder = T.unsafe(nil)); end + + # Creates and configures the request object. + # + # @param method [Symbol] + # @return [Faraday::Request] + # @yield [Faraday::Request] if block given + # + # source://faraday//lib/faraday/connection.rb#525 + def build_request(method); end + + # Takes a relative url for a request and combines it with the defaults + # set on the connection instance. + # + # @example + # conn = Faraday::Connection.new { ... } + # conn.url_prefix = "https://sushi.com/api?token=abc" + # conn.scheme # => https + # conn.path_prefix # => "/api" + # + # conn.build_url("nigiri?page=2") + # # => https://sushi.com/api/nigiri?token=abc&page=2 + # + # conn.build_url("nigiri", page: 2) + # # => https://sushi.com/api/nigiri?token=abc&page=2 + # @param url [String] + # @param extra_params [Hash] + # + # source://faraday//lib/faraday/connection.rb#479 + def build_url(url = T.unsafe(nil), extra_params = T.unsafe(nil)); end + + # @return [Faraday::RackBuilder] Builder for this Connection. + # + # source://faraday//lib/faraday/connection.rb#33 + def builder; end + + # Closes the underlying resources and/or connections. In the case of + # persistent connections, this closes all currently open connections + # but does not prevent new connections from being made. + # + # source://faraday//lib/faraday/connection.rb#127 + def close; end + + # Check if the adapter is parallel-capable. + # + # @api private + # @return [Object, nil] a parallel manager or nil if yielded + # @yield if the adapter isn't parallel-capable, or if no adapter is set yet. + # + # source://faraday//lib/faraday/connection.rb#363 + def default_parallel_manager; end + + # Sets the default parallel manager for this connection. + # + # source://faraday//lib/faraday/connection.rb#42 + def default_parallel_manager=(_arg0); end + + # source://faraday//lib/faraday/connection.rb#201 + def delete(url = T.unsafe(nil), params = T.unsafe(nil), headers = T.unsafe(nil)); end + + # Creates a duplicate of this Faraday::Connection. + # + # @api private + # @return [Faraday::Connection] + # + # source://faraday//lib/faraday/connection.rb#564 + def dup; end + + # source://faraday//lib/faraday/connection.rb#620 + def find_default_proxy; end + + # source://faraday//lib/faraday/connection.rb#201 + def get(url = T.unsafe(nil), params = T.unsafe(nil), headers = T.unsafe(nil)); end + + # source://faraday//lib/faraday/connection.rb#201 + def head(url = T.unsafe(nil), params = T.unsafe(nil), headers = T.unsafe(nil)); end + + # @return [Hash] unencoded HTTP header key/value pairs. + # + # source://faraday//lib/faraday/connection.rb#26 + def headers; end + + # Sets the Hash of unencoded HTTP header key/value pairs. + # + # @param hash [Hash] + # + # source://faraday//lib/faraday/connection.rb#116 + def headers=(hash); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def host(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def host=(*args, **_arg1, &block); end + + # Sets up the parallel manager to make a set of requests. + # + # @param manager [Object] The parallel manager that this Connection's + # Adapter uses. + # @return [void] + # @yield a block to execute multiple requests. + # + # source://faraday//lib/faraday/connection.rb#389 + def in_parallel(manager = T.unsafe(nil)); end + + # Determine if this Faraday::Connection can make parallel requests. + # + # @return [Boolean] + # + # source://faraday//lib/faraday/connection.rb#378 + def in_parallel?; end + + # source://faraday//lib/faraday/connection.rb#98 + def initialize_proxy(url, options); end + + # @example + # conn.options '/items/1' + # @overload options + # @overload options + # @return [Faraday::Response] + # @yield [Faraday::Request] for further request customizations + # + # source://faraday//lib/faraday/connection.rb#224 + def options(*args); end + + # @return [Object] the parallel manager for this Connection. + # + # source://faraday//lib/faraday/connection.rb#39 + def parallel_manager; end + + # @return [Hash] URI query unencoded key/value pairs. + # + # source://faraday//lib/faraday/connection.rb#23 + def params; end + + # Sets the Hash of URI query unencoded key/value pairs. + # + # @param hash [Hash] + # + # source://faraday//lib/faraday/connection.rb#110 + def params=(hash); end + + # source://faraday//lib/faraday/connection.rb#282 + def patch(url = T.unsafe(nil), body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def path_prefix(*args, **_arg1, &block); end + + # Sets the path prefix and ensures that it always has a leading + # slash. + # + # @param value [String] + # @return [String] the new path prefix + # + # source://faraday//lib/faraday/connection.rb#454 + def path_prefix=(value); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def port(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def port=(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/connection.rb#282 + def post(url = T.unsafe(nil), body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # @return [Hash] proxy options. + # + # source://faraday//lib/faraday/connection.rb#45 + def proxy; end + + # Sets the Hash proxy options. + # + # @param new_value [Object] + # + # source://faraday//lib/faraday/connection.rb#405 + def proxy=(new_value); end + + # source://faraday//lib/faraday/connection.rb#628 + def proxy_for_request(url); end + + # source://faraday//lib/faraday/connection.rb#595 + def proxy_from_env(url); end + + # source://faraday//lib/faraday/connection.rb#282 + def put(url = T.unsafe(nil), body = T.unsafe(nil), headers = T.unsafe(nil), &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def request(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def response(*args, **_arg1, &block); end + + # Builds and runs the Faraday::Request. + # + # @param method [Symbol] HTTP method. + # @param url [String, URI] String or URI to access. + # @param body [Object] The request body that will eventually be converted to + # a string. + # @param headers [Hash] unencoded HTTP header key/value pairs. + # @return [Faraday::Response] + # + # source://faraday//lib/faraday/connection.rb#503 + def run_request(method, url, body, headers); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def scheme(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def scheme=(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/connection.rb#587 + def set_authorization_header(header_type, *args); end + + # source://faraday//lib/faraday/connection.rb#443 + def set_basic_auth(user, password); end + + # @return [Hash] SSL options. + # + # source://faraday//lib/faraday/connection.rb#36 + def ssl; end + + # @return [Boolean] + # + # source://faraday//lib/faraday/connection.rb#638 + def support_parallel?(adapter); end + + # Sets up the Authorization header with the given token. + # + # @example + # + # conn.token_auth 'abcdef', foo: 'bar' + # conn.headers['Authorization'] + # # => "Token token=\"abcdef\", + # foo=\"bar\"" + # @param token [String] + # @param options [Hash] extra token options. + # @return [void] + # + # source://faraday//lib/faraday/deprecate.rb#86 + def token_auth(*args, &block); end + + # source://faraday//lib/faraday/connection.rb#201 + def trace(url = T.unsafe(nil), params = T.unsafe(nil), headers = T.unsafe(nil)); end + + # @return [String] a URI with the prefix used for all requests from this + # Connection. This includes a default host name, scheme, port, and path. + # + # source://faraday//lib/faraday/connection.rb#30 + def url_prefix; end + + # Parses the given URL with URI and stores the individual + # components in this connection. These components serve as defaults for + # requests made by this connection. + # + # @example + # + # conn = Faraday::Connection.new { ... } + # conn.url_prefix = "https://sushi.com/api" + # conn.scheme # => https + # conn.path_prefix # => "/api" + # + # conn.get("nigiri?page=2") # accesses https://sushi.com/api/nigiri + # @param url [String, URI] + # @param encoder [Object] + # + # source://faraday//lib/faraday/connection.rb#428 + def url_prefix=(url, encoder = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def use(*args, **_arg1, &block); end + + # Yields username and password extracted from a URI if they both exist. + # + # @api private + # @param uri [URI] + # @return [void] + # @yield [username, password] any username and password + # @yieldparam username [String] any username from URI + # @yieldparam password [String] any password from URI + # + # source://faraday//lib/faraday/connection.rb#581 + def with_uri_credentials(uri); end +end + +# A Set of allowed HTTP verbs. +# +# source://faraday//lib/faraday/connection.rb#19 +Faraday::Connection::METHODS = T.let(T.unsafe(nil), Set) + +# source://faraday//lib/faraday/connection.rb#20 +Faraday::Connection::USER_AGENT = T.let(T.unsafe(nil), String) + +# A unified error for failed connections. +# +# source://faraday//lib/faraday/error.rb#136 +class Faraday::ConnectionFailed < ::Faraday::Error; end + +# ConnectionOptions contains the configurable properties for a Faraday +# connection object. +# +# source://faraday//lib/faraday/options/connection_options.rb#8 +class Faraday::ConnectionOptions < ::Faraday::Options + # source://faraday//lib/faraday/options.rb#177 + def builder_class; end + + # source://faraday//lib/faraday/options/connection_options.rb#18 + def new_builder(block); end + + # source://faraday//lib/faraday/options.rb#177 + def request; end + + # source://faraday//lib/faraday/options.rb#177 + def ssl; end +end + +# Sub-module for decoding query-string into parameters. +# +# source://faraday//lib/faraday/encoders/nested_params_encoder.rb#75 +module Faraday::DecodeMethods + # @param query [nil, String] + # @raise [TypeError] if the nesting is incorrect + # @return [Array] the decoded params + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#81 + def decode(query); end + + protected + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#138 + def add_to_context(is_array, context, value, subkey); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#101 + def decode_pair(key, value, context); end + + # Internal: convert a nested hash with purely numeric keys into an array. + # FIXME: this is not compatible with Rack::Utils.parse_nested_query + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#145 + def dehash(hash, depth); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#133 + def match_context(context, subkey); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#123 + def new_context(subkey, is_array, context); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#113 + def prepare_context(context, subkey, is_array, last_subkey); end +end + +# source://faraday//lib/faraday/encoders/nested_params_encoder.rb#99 +Faraday::DecodeMethods::SUBKEYS_REGEX = T.let(T.unsafe(nil), Regexp) + +# DependencyLoader helps Faraday adapters and middleware load dependencies. +# +# source://faraday//lib/faraday/dependency_loader.rb#7 +module Faraday::DependencyLoader + # Executes a block which should try to require and reference dependent + # libraries + # + # source://faraday//lib/faraday/dependency_loader.rb#12 + def dependency(lib = T.unsafe(nil)); end + + # source://faraday//lib/faraday/dependency_loader.rb#30 + def inherited(subclass); end + + # Returns the value of attribute load_error. + # + # source://faraday//lib/faraday/dependency_loader.rb#8 + def load_error; end + + # @return [Boolean] + # + # source://faraday//lib/faraday/dependency_loader.rb#26 + def loaded?; end + + # source://faraday//lib/faraday/dependency_loader.rb#18 + def new(*_arg0, **_arg1); end + + private + + # Sets the attribute load_error + # + # @param value the value to set the attribute load_error to. + # + # source://faraday//lib/faraday/dependency_loader.rb#37 + def load_error=(_arg0); end +end + +# Deprecation using semver instead of date, based on Gem::Deprecate +# Provides a single method +deprecate+ to be used to declare when +# something is going away. +# +# class Legacy +# def self.klass_method +# # ... +# end +# +# def instance_method +# # ... +# end +# +# extend Faraday::Deprecate +# deprecate :instance_method, "X.z", '1.0' +# +# class << self +# extend Faraday::Deprecate +# deprecate :klass_method, :none, '1.0' +# end +# end +# +# source://faraday//lib/faraday/deprecate.rb#49 +module Faraday::Deprecate + private + + # Simple deprecation method that deprecates +name+ by wrapping it up + # in a dummy method. It warns on each call to the dummy method + # telling the user of +repl+ (unless +repl+ is :none) and the + # semver that it is planned to go away. + # + # @param name [Symbol] the method symbol to deprecate + # @param repl [#to_s, :none] the replacement to use, when `:none` it will + # alert the user that no replacement is present. + # @param ver [String] the semver the method will be removed. + # + # source://faraday//lib/faraday/deprecate.rb#81 + def deprecate(name, repl, ver, custom_message = T.unsafe(nil)); end + + # Temporarily turn off warnings. Intended for tests only. + # + # source://faraday//lib/faraday/deprecate.rb#65 + def skip_during; end + + class << self + # Simple deprecation method that deprecates +name+ by wrapping it up + # in a dummy method. It warns on each call to the dummy method + # telling the user of +repl+ (unless +repl+ is :none) and the + # semver that it is planned to go away. + # + # @param name [Symbol] the method symbol to deprecate + # @param repl [#to_s, :none] the replacement to use, when `:none` it will + # alert the user that no replacement is present. + # @param ver [String] the semver the method will be removed. + # + # source://faraday//lib/faraday/deprecate.rb#81 + def deprecate(name, repl, ver, custom_message = T.unsafe(nil)); end + + # source://faraday//lib/faraday/deprecate.rb#50 + def skip; end + + # source://faraday//lib/faraday/deprecate.rb#60 + def skip=(value); end + + # Temporarily turn off warnings. Intended for tests only. + # + # source://faraday//lib/faraday/deprecate.rb#65 + def skip_during; end + end +end + +# @param new_klass [Class] new Klass to use +# @return [Class] A modified version of new_klass that warns on +# usage about deprecation. +# @see Faraday::Deprecate +# +# source://faraday//lib/faraday/deprecate.rb#9 +module Faraday::DeprecatedClass + class << self + # source://faraday//lib/faraday/deprecate.rb#10 + def proxy_class(origclass, ver = T.unsafe(nil)); end + end +end + +# Sub-module for encoding parameters into query-string. +# +# source://faraday//lib/faraday/encoders/nested_params_encoder.rb#5 +module Faraday::EncodeMethods + # @param params [nil, Array, #to_hash] parameters to be encoded + # @raise [TypeError] if params can not be converted to a Hash + # @return [String] the encoded params + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#11 + def encode(params); end + + protected + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#64 + def encode_array(parent, value); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#53 + def encode_hash(parent, value); end + + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#40 + def encode_pair(parent, value); end +end + +# source://faraday//lib/faraday/options/env.rb#52 +class Faraday::Env < ::Faraday::Options + extend ::Forwardable + + # @param key [Object] + # + # source://faraday//lib/faraday/options/env.rb#84 + def [](key); end + + # @param key [Object] + # @param value [Object] + # + # source://faraday//lib/faraday/options/env.rb#96 + def []=(key, value); end + + # string. + # + # @return [String] The request body that will eventually be converted to a + # + # source://faraday//lib/faraday/options/env.rb#113 + def body; end + + # string. + # + # @return [String] The request body that will eventually be converted to a + # + # source://faraday//lib/faraday/options/env.rb#117 + def body=(value); end + + # Sets content length to zero and the body to the empty string. + # + # source://faraday//lib/faraday/options/env.rb#133 + def clear_body; end + + # source://faraday//lib/faraday/options/env.rb#109 + def current_body; end + + # @private + # + # source://faraday//lib/faraday/options/env.rb#161 + def custom_members; end + + # @return [Boolean] + # + # source://faraday//lib/faraday/options/env.rb#167 + def in_member_set?(key); end + + # source://faraday//lib/faraday/options/env.rb#149 + def inspect; end + + # set of {MethodsWithBodies}. + # + # @return [Boolean] true if there's no body yet, and the method is in the + # + # source://faraday//lib/faraday/options/env.rb#128 + def needs_body?; end + + # @return [Boolean] true if there is a parallel_manager + # + # source://faraday//lib/faraday/options/env.rb#145 + def parallel?; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def params_encoder(*args, **_arg1, &block); end + + # {StatusesWithoutBody}. + # + # @return [Boolean] true if the status isn't in the set of + # + # source://faraday//lib/faraday/options/env.rb#140 + def parse_body?; end + + # @return [Boolean] true if status is in the set of {SuccessfulStatuses}. + # + # source://faraday//lib/faraday/options/env.rb#122 + def success?; end + + class << self + # Build a new Env from given value. Respects and updates `custom_members`. + # + # @param value [Object] a value fitting Option.from(v). + # @return [Env] from given value + # + # source://faraday//lib/faraday/options/env.rb#75 + def from(value); end + + # @private + # + # source://faraday//lib/faraday/options/env.rb#177 + def member_set; end + end +end + +# source://faraday//lib/faraday/options/env.rb#55 +Faraday::Env::ContentLength = T.let(T.unsafe(nil), String) + +# A Set of HTTP verbs that typically send a body. If no body is set for +# these requests, the Content-Length header is set to 0. +# +# source://faraday//lib/faraday/options/env.rb#62 +Faraday::Env::MethodsWithBodies = T.let(T.unsafe(nil), Set) + +# source://faraday//lib/faraday/options/env.rb#56 +Faraday::Env::StatusesWithoutBody = T.let(T.unsafe(nil), Set) + +# source://faraday//lib/faraday/options/env.rb#57 +Faraday::Env::SuccessfulStatuses = T.let(T.unsafe(nil), Range) + +# Faraday error base class. +# +# source://faraday//lib/faraday/error.rb#6 +class Faraday::Error < ::StandardError + # @return [Error] a new instance of Error + # + # source://faraday//lib/faraday/error.rb#9 + def initialize(exc, response = T.unsafe(nil)); end + + # source://faraday//lib/faraday/error.rb#15 + def backtrace; end + + # source://faraday//lib/faraday/error.rb#23 + def inspect; end + + # Returns the value of attribute response. + # + # source://faraday//lib/faraday/error.rb#7 + def response; end + + # source://faraday//lib/faraday/error.rb#39 + def response_body; end + + # source://faraday//lib/faraday/error.rb#35 + def response_headers; end + + # source://faraday//lib/faraday/error.rb#31 + def response_status; end + + # Returns the value of attribute wrapped_exception. + # + # source://faraday//lib/faraday/error.rb#7 + def wrapped_exception; end + + protected + + # Pulls out potential parent exception and response hash. + # + # source://faraday//lib/faraday/error.rb#74 + def exc_msg_and_response(exc, response = T.unsafe(nil)); end + + # Pulls out potential parent exception and response hash, storing them in + # instance variables. + # exc - Either an Exception, a string message, or a response hash. + # response - Hash + # :status - Optional integer HTTP response status + # :headers - String key/value hash of HTTP response header + # values. + # :body - Optional string HTTP response body. + # :request - Hash + # :method - Symbol with the request HTTP method. + # :url_path - String with the url path requested. + # :params - String key/value hash of query params + # present in the request. + # :headers - String key/value hash of HTTP request + # header values. + # :body - String HTTP request body. + # + # If a subclass has to call this, then it should pass a string message + # to `super`. See NilStatusError. + # + # source://faraday//lib/faraday/error.rb#64 + def exc_msg_and_response!(exc, response = T.unsafe(nil)); end +end + +# FlatParamsEncoder manages URI params as a flat hash. Any Array values repeat +# the parameter multiple times. +# +# source://faraday//lib/faraday/encoders/flat_params_encoder.rb#6 +module Faraday::FlatParamsEncoder + class << self + # Decode converts the given URI querystring into a hash. + # + # @example + # + # decode('a=one&a=two&a=three&b=true&c=C') + # # => {"a"=>["one", "two", "three"], "b"=>"true", "c"=>"C"} + # @param query [String] query arguments to parse. + # @return [Hash] parsed keys and value strings from the querystring. + # + # source://faraday//lib/faraday/encoders/flat_params_encoder.rb#74 + def decode(query); end + + # Encode converts the given param into a URI querystring. Keys and values + # will converted to strings and appropriately escaped for the URI. + # + # @example + # + # encode({a: %w[one two three], b: true, c: "C"}) + # # => 'a=one&a=two&a=three&b=true&c=C' + # @param params [Hash] query arguments to convert. + # @return [String] the URI querystring (without the leading '?') + # + # source://faraday//lib/faraday/encoders/flat_params_encoder.rb#23 + def encode(params); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def escape(*args, **_arg1, &block); end + + # Returns the value of attribute sort_params. + # + # source://faraday//lib/faraday/encoders/flat_params_encoder.rb#99 + def sort_params; end + + # Sets the attribute sort_params + # + # @param value the value to set the attribute sort_params to. + # + # source://faraday//lib/faraday/encoders/flat_params_encoder.rb#99 + def sort_params=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def unescape(*args, **_arg1, &block); end + end +end + +# Raised by Faraday::Response::RaiseError in case of a 403 response. +# +# source://faraday//lib/faraday/error.rb#97 +class Faraday::ForbiddenError < ::Faraday::ClientError; end + +# source://faraday//lib/faraday/logging/formatter.rb#5 +module Faraday::Logging; end + +# Serves as an integration point to customize logging +# +# source://faraday//lib/faraday/logging/formatter.rb#7 +class Faraday::Logging::Formatter + extend ::Forwardable + + # @return [Formatter] a new instance of Formatter + # + # source://faraday//lib/faraday/logging/formatter.rb#13 + def initialize(logger:, options:); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def debug(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def error(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def fatal(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/logging/formatter.rb#39 + def filter(filter_word, filter_replacement); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def info(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/logging/formatter.rb#21 + def request(env); end + + # source://faraday//lib/faraday/logging/formatter.rb#31 + def response(env); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def warn(*args, **_arg1, &block); end + + private + + # source://faraday//lib/faraday/logging/formatter.rb#79 + def apply_filters(output); end + + # source://faraday//lib/faraday/logging/formatter.rb#49 + def dump_body(body); end + + # source://faraday//lib/faraday/logging/formatter.rb#45 + def dump_headers(headers); end + + # source://faraday//lib/faraday/logging/formatter.rb#99 + def log_body(type, body); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/logging/formatter.rb#70 + def log_body?(type); end + + # source://faraday//lib/faraday/logging/formatter.rb#94 + def log_headers(type, headers); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/logging/formatter.rb#61 + def log_headers?(type); end + + # source://faraday//lib/faraday/logging/formatter.rb#86 + def log_level; end + + # source://faraday//lib/faraday/logging/formatter.rb#57 + def pretty_inspect(body); end +end + +# source://faraday//lib/faraday/logging/formatter.rb#10 +Faraday::Logging::Formatter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://faraday//lib/faraday/methods.rb#5 +Faraday::METHODS_WITH_BODY = T.let(T.unsafe(nil), Array) + +# source://faraday//lib/faraday/methods.rb#4 +Faraday::METHODS_WITH_QUERY = T.let(T.unsafe(nil), Array) + +# Middleware is the basic base class of any Faraday middleware. +# +# source://faraday//lib/faraday/middleware.rb#5 +class Faraday::Middleware + extend ::Faraday::MiddlewareRegistry + extend ::Faraday::DependencyLoader + + # @return [Middleware] a new instance of Middleware + # + # source://faraday//lib/faraday/middleware.rb#11 + def initialize(app = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute app. + # + # source://faraday//lib/faraday/middleware.rb#9 + def app; end + + # source://faraday//lib/faraday/middleware.rb#16 + def call(env); end + + # source://faraday//lib/faraday/middleware.rb#23 + def close; end + + # Returns the value of attribute options. + # + # source://faraday//lib/faraday/middleware.rb#9 + def options; end +end + +# Adds the ability for other modules to register and lookup +# middleware classes. +# +# source://faraday//lib/faraday/middleware_registry.rb#8 +module Faraday::MiddlewareRegistry + # source://faraday//lib/faraday/middleware_registry.rb#99 + def fetch_middleware(key); end + + # source://faraday//lib/faraday/middleware_registry.rb#103 + def load_middleware(key); end + + # Lookup middleware class with a registered Symbol shortcut. + # + # @example + # + # module Faraday + # class Whatever + # register_middleware foo: Foo + # end + # end + # + # Faraday::Whatever.lookup_middleware(:foo) + # # => Faraday::Whatever::Foo + # @param key [Symbol] key for the registered middleware. + # @raise [Faraday::Error] if given key is not registered + # @return [Class] a middleware Class. + # + # source://faraday//lib/faraday/middleware_registry.rb#89 + def lookup_middleware(key); end + + # source://faraday//lib/faraday/middleware_registry.rb#94 + def middleware_mutex(&block); end + + # Register middleware class(es) on the current module. + # + # }] Middleware mapping from a lookup symbol to a reference to the + # middleware. + # Classes can be expressed as: + # - a fully qualified constant + # - a Symbol + # - a Proc that will be lazily called to return the former + # - an array is given, its first element is the constant or symbol, + # and its second is a file to `require`. + # + # @example Lookup by a constant + # + # module Faraday + # class Whatever + # # Middleware looked up by :foo returns Faraday::Whatever::Foo. + # register_middleware foo: Foo + # end + # end + # @example Lookup by a symbol + # + # module Faraday + # class Whatever + # # Middleware looked up by :bar returns + # # Faraday::Whatever.const_get(:Bar) + # register_middleware bar: :Bar + # end + # end + # @example Lookup by a symbol and string in an array + # + # module Faraday + # class Whatever + # # Middleware looked up by :baz requires 'baz' and returns + # # Faraday::Whatever.const_get(:Baz) + # register_middleware baz: [:Baz, 'baz'] + # end + # end + # @param autoload_path [String] Middleware autoload path + # @param mapping [Hash{ + # Symbol => Module, + # Symbol => Array,] apping [Hash{ + # Symbol => Module, + # Symbol => Array, + # @return [void] + # + # source://faraday//lib/faraday/middleware_registry.rb#54 + def register_middleware(autoload_path = T.unsafe(nil), mapping = T.unsafe(nil)); end + + # Unregister a previously registered middleware class. + # + # @param key [Symbol] key for the registered middleware. + # + # source://faraday//lib/faraday/middleware_registry.rb#68 + def unregister_middleware(key); end +end + +# This is the default encoder for Faraday requests. +# Using this encoder, parameters will be encoded respecting their structure, +# so you can send objects such as Arrays or Hashes as parameters +# for your requests. +# +# source://faraday//lib/faraday/encoders/nested_params_encoder.rb#162 +module Faraday::NestedParamsEncoder + extend ::Faraday::EncodeMethods + extend ::Faraday::DecodeMethods + + class << self + # source://forwardable/1.3.3/forwardable.rb#231 + def escape(*args, **_arg1, &block); end + + # Returns the value of attribute sort_params. + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#164 + def sort_params; end + + # Sets the attribute sort_params + # + # @param value the value to set the attribute sort_params to. + # + # source://faraday//lib/faraday/encoders/nested_params_encoder.rb#164 + def sort_params=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def unescape(*args, **_arg1, &block); end + end +end + +# Raised by Faraday::Response::RaiseError in case of a nil status in response. +# +# source://faraday//lib/faraday/error.rb#128 +class Faraday::NilStatusError < ::Faraday::ServerError + # @return [NilStatusError] a new instance of NilStatusError + # + # source://faraday//lib/faraday/error.rb#129 + def initialize(exc, response = T.unsafe(nil)); end +end + +# Subclasses Struct with some special helpers for converting from a Hash to +# a Struct. +# +# source://faraday//lib/faraday/options.rb#6 +class Faraday::Options < ::Struct + # source://faraday//lib/faraday/options.rb#185 + def [](key); end + + # Public + # + # source://faraday//lib/faraday/options.rb#46 + def clear; end + + # Public + # + # source://faraday//lib/faraday/options.rb#71 + def deep_dup; end + + # Public + # + # source://faraday//lib/faraday/options.rb#39 + def delete(key); end + + # Public + # + # source://faraday//lib/faraday/options.rb#13 + def each; end + + # Public + # + # source://faraday//lib/faraday/options.rb#106 + def each_key(&block); end + + # Public + # + # source://faraday//lib/faraday/options.rb#120 + def each_value(&block); end + + # Public + # + # @return [Boolean] + # + # source://faraday//lib/faraday/options.rb#101 + def empty?; end + + # Public + # + # source://faraday//lib/faraday/options.rb#76 + def fetch(key, *args); end + + # Public + # + # @return [Boolean] + # + # source://faraday//lib/faraday/options.rb#113 + def has_key?(key); end + + # Public + # + # @return [Boolean] + # + # source://faraday//lib/faraday/options.rb#127 + def has_value?(value); end + + # Internal + # + # source://faraday//lib/faraday/options.rb#144 + def inspect; end + + # Public + # + # @return [Boolean] + # + # source://faraday//lib/faraday/options.rb#113 + def key?(key); end + + # Public + # + # source://faraday//lib/faraday/options.rb#96 + def keys; end + + # Public + # + # source://faraday//lib/faraday/options.rb#66 + def merge(other); end + + # Public + # + # source://faraday//lib/faraday/options.rb#51 + def merge!(other); end + + # source://faraday//lib/faraday/options.rb#194 + def symbolized_key_set; end + + # Public + # + # source://faraday//lib/faraday/options.rb#134 + def to_hash; end + + # Public + # + # source://faraday//lib/faraday/options.rb#22 + def update(obj); end + + # Public + # + # @return [Boolean] + # + # source://faraday//lib/faraday/options.rb#127 + def value?(value); end + + # Public + # + # source://faraday//lib/faraday/options.rb#91 + def values_at(*keys); end + + class << self + # Internal + # + # source://faraday//lib/faraday/options.rb#166 + def attribute_options; end + + # source://faraday//lib/faraday/options.rb#204 + def fetch_error_class; end + + # Public + # + # source://faraday//lib/faraday/options.rb#8 + def from(value); end + + # @private + # + # source://faraday//lib/faraday/options.rb#198 + def inherited(subclass); end + + # source://faraday//lib/faraday/options.rb#170 + def memoized(key, &block); end + + # source://faraday//lib/faraday/options.rb#181 + def memoized_attributes; end + + # Internal + # + # source://faraday//lib/faraday/options.rb#156 + def options(mapping); end + + # Internal + # + # source://faraday//lib/faraday/options.rb#161 + def options_for(key); end + end +end + +# Raised by FaradayMiddleware::ResponseMiddleware +# +# source://faraday//lib/faraday/error.rb#144 +class Faraday::ParsingError < ::Faraday::Error; end + +# Raised by Faraday::Response::RaiseError in case of a 407 response. +# +# source://faraday//lib/faraday/error.rb#105 +class Faraday::ProxyAuthError < ::Faraday::ClientError; end + +# ProxyOptions contains the configurable properties for the proxy +# configuration used when making an HTTP request. +# +# source://faraday//lib/faraday/options/proxy_options.rb#6 +class Faraday::ProxyOptions < ::Faraday::Options + extend ::Forwardable + + # source://forwardable/1.3.3/forwardable.rb#231 + def host(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def host=(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/options.rb#177 + def password; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def path(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def path=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def port(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def port=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def scheme(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def scheme=(*args, **_arg1, &block); end + + # source://faraday//lib/faraday/options.rb#177 + def user; end + + class << self + # source://faraday//lib/faraday/options/proxy_options.rb#11 + def from(value); end + end +end + +# A Builder that processes requests into responses by passing through an inner +# middleware stack (heavily inspired by Rack). +# +# @example +# Faraday::Connection.new(url: 'http://sushi.com') do |builder| +# builder.request :url_encoded # Faraday::Request::UrlEncoded +# builder.adapter :net_http # Faraday::Adapter::NetHttp +# end +# +# source://faraday//lib/faraday/rack_builder.rb#15 +class Faraday::RackBuilder + # @return [RackBuilder] a new instance of RackBuilder + # + # source://faraday//lib/faraday/rack_builder.rb#61 + def initialize(handlers = T.unsafe(nil), adapter = T.unsafe(nil), &block); end + + # source://faraday//lib/faraday/rack_builder.rb#179 + def ==(other); end + + # source://faraday//lib/faraday/rack_builder.rb#80 + def [](idx); end + + # source://faraday//lib/faraday/rack_builder.rb#111 + def adapter(klass = T.unsafe(nil), *args, **_arg2, &block); end + + # The "rack app" wrapped in middleware. All requests are sent here. + # + # The builder is responsible for creating the app object. After this, + # the builder gets locked to ensure no further modifications are made + # to the middleware stack. + # + # Returns an object that responds to `call` and returns a Response. + # + # source://faraday//lib/faraday/rack_builder.rb#164 + def app; end + + # @yield [_self] + # @yieldparam _self [Faraday::RackBuilder] the object that the method was called on + # + # source://faraday//lib/faraday/rack_builder.rb#73 + def build(options = T.unsafe(nil)); end + + # ENV Keys + # :http_method - a symbolized request HTTP method (:get, :post) + # :body - the request body that will eventually be converted to a string. + # :url - URI instance for the current request. + # :status - HTTP response status code + # :request_headers - hash of HTTP Headers to be sent to the server + # :response_headers - Hash of HTTP headers from the server + # :parallel_manager - sent if the connection is in parallel mode + # :request - Hash of options for configuring the request. + # :timeout - open/read timeout Integer in seconds + # :open_timeout - read timeout Integer in seconds + # :proxy - Hash of proxy options + # :uri - Proxy Server URI + # :user - Proxy server username + # :password - Proxy server password + # :ssl - Hash of options for configuring SSL requests. + # + # source://faraday//lib/faraday/rack_builder.rb#205 + def build_env(connection, request); end + + # Processes a Request into a Response by passing it through this Builder's + # middleware stack. + # + # @param connection [Faraday::Connection] + # @param request [Faraday::Request] + # @return [Faraday::Response] + # + # source://faraday//lib/faraday/rack_builder.rb#153 + def build_response(connection, request); end + + # source://faraday//lib/faraday/rack_builder.rb#141 + def delete(handler); end + + # source://faraday//lib/faraday/rack_builder.rb#185 + def dup; end + + # Returns the value of attribute handlers. + # + # source://faraday//lib/faraday/rack_builder.rb#19 + def handlers; end + + # Sets the attribute handlers + # + # @param value the value to set the attribute handlers to. + # + # source://faraday//lib/faraday/rack_builder.rb#19 + def handlers=(_arg0); end + + # methods to push onto the various positions in the stack: + # + # source://faraday//lib/faraday/rack_builder.rb#120 + def insert(index, *args, **_arg2, &block); end + + # source://faraday//lib/faraday/rack_builder.rb#129 + def insert_after(index, *args, **_arg2, &block); end + + # methods to push onto the various positions in the stack: + # + # source://faraday//lib/faraday/rack_builder.rb#120 + def insert_before(index, *args, **_arg2, &block); end + + # Locks the middleware stack to ensure no further modifications are made. + # + # source://faraday//lib/faraday/rack_builder.rb#85 + def lock!; end + + # @return [Boolean] + # + # source://faraday//lib/faraday/rack_builder.rb#89 + def locked?; end + + # source://faraday//lib/faraday/rack_builder.rb#103 + def request(key, *args, **_arg2, &block); end + + # source://faraday//lib/faraday/rack_builder.rb#107 + def response(key, *args, **_arg2, &block); end + + # source://faraday//lib/faraday/rack_builder.rb#134 + def swap(index, *args, **_arg2, &block); end + + # source://faraday//lib/faraday/rack_builder.rb#171 + def to_app; end + + # source://faraday//lib/faraday/rack_builder.rb#93 + def use(klass, *args, **_arg2, &block); end + + private + + # @return [Boolean] + # + # source://faraday//lib/faraday/rack_builder.rb#230 + def adapter_set?; end + + # source://faraday//lib/faraday/rack_builder.rb#242 + def assert_index(index); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/rack_builder.rb#234 + def is_adapter?(klass); end + + # source://faraday//lib/faraday/rack_builder.rb#224 + def raise_if_adapter(klass); end + + # @raise [StackLocked] + # + # source://faraday//lib/faraday/rack_builder.rb#220 + def raise_if_locked; end + + # source://faraday//lib/faraday/rack_builder.rb#238 + def use_symbol(mod, key, *args, **_arg3, &block); end +end + +# borrowed from ActiveSupport::Dependencies::Reference & +# ActionDispatch::MiddlewareStack::Middleware +# +# source://faraday//lib/faraday/rack_builder.rb#26 +class Faraday::RackBuilder::Handler + # source://faraday//lib/faraday/rack_builder.rb#31 + def initialize(klass, *args, **_arg2, &block); end + + # source://faraday//lib/faraday/rack_builder.rb#46 + def ==(other); end + + # source://faraday//lib/faraday/rack_builder.rb#56 + def build(app = T.unsafe(nil)); end + + # source://faraday//lib/faraday/rack_builder.rb#42 + def inspect; end + + # source://faraday//lib/faraday/rack_builder.rb#38 + def klass; end + + # Returns the value of attribute name. + # + # source://faraday//lib/faraday/rack_builder.rb#29 + def name; end +end + +# source://faraday//lib/faraday/rack_builder.rb#27 +Faraday::RackBuilder::Handler::REGISTRY = T.let(T.unsafe(nil), Faraday::AdapterRegistry) + +# source://faraday//lib/faraday/rack_builder.rb#218 +Faraday::RackBuilder::LOCK_ERR = T.let(T.unsafe(nil), String) + +# Used to detect missing arguments +# +# source://faraday//lib/faraday/rack_builder.rb#17 +Faraday::RackBuilder::NO_ARGUMENT = T.let(T.unsafe(nil), Object) + +# Error raised when trying to modify the stack after calling `lock!` +# +# source://faraday//lib/faraday/rack_builder.rb#22 +class Faraday::RackBuilder::StackLocked < ::RuntimeError; end + +# Used to setup URLs, params, headers, and the request body in a sane manner. +# +# +# @example +# @connection.post do |req| +# req.url 'http://localhost', 'a' => '1' # 'http://localhost?a=1' +# req.headers['b'] = '2' # Header +# req.params['c'] = '3' # GET Param +# req['b'] = '2' # also Header +# req.body = 'abc' +# end +# +# source://faraday//lib/faraday/request.rb#31 +class Faraday::Request < ::Struct + extend ::Faraday::MiddlewareRegistry + extend ::Faraday::Deprecate + extend ::Faraday::AutoloadHelper + + # @param key [Object] key to look up in headers + # @return [Object] value of the given header name + # + # source://faraday//lib/faraday/request.rb#112 + def [](key); end + + # @param key [Object] key of header to write + # @param value [Object] value of header + # + # source://faraday//lib/faraday/request.rb#118 + def []=(key, value); end + + # source://faraday//lib/faraday/request.rb#60 + def _deprecated_method; end + + # Replace request headers, preserving the existing hash type. + # + # @param hash [Hash] new headers + # + # source://faraday//lib/faraday/request.rb#81 + def headers=(hash); end + + # Marshal serialization support. + # + # @return [Hash] the hash ready to be serialized in Marshal. + # + # source://faraday//lib/faraday/request.rb#125 + def marshal_dump; end + + # Marshal serialization support. + # Restores the instance variables according to the +serialised+. + # + # @param serialised [Hash] the serialised object. + # + # source://faraday//lib/faraday/request.rb#139 + def marshal_load(serialised); end + + # source://faraday//lib/faraday/deprecate.rb#86 + def method(*args, &block); end + + # Replace params, preserving the existing hash type. + # + # @param hash [Hash] new params + # + # source://faraday//lib/faraday/request.rb#70 + def params=(hash); end + + # @return [Env] the Env for this Request + # + # source://faraday//lib/faraday/request.rb#149 + def to_env(connection); end + + # Update path and params. + # + # @param path [URI, String] + # @param params [Hash, nil] + # @return [void] + # + # source://faraday//lib/faraday/request.rb#94 + def url(path, params = T.unsafe(nil)); end + + class << self + # @param request_method [String] + # @return [Request] + # @yield [request] for block customization, if block given + # @yieldparam request [Request] + # + # source://faraday//lib/faraday/request.rb#54 + def create(request_method); end + end +end + +# Request middleware for the Authorization HTTP header +# +# source://faraday//lib/faraday/request/authorization.rb#8 +class Faraday::Request::Authorization < ::Faraday::Middleware + # @param app [#call] + # @param type [String, Symbol] Type of Authorization + # @param param [String, Symbol, Hash, Proc] parameter to build the Authorization header. + # This value can be a proc, in which case it will be invoked on each request. + # @return [Authorization] a new instance of Authorization + # + # source://faraday//lib/faraday/request/authorization.rb#48 + def initialize(app, type, param); end + + # @param env [Faraday::Env] + # + # source://faraday//lib/faraday/request/authorization.rb#55 + def on_request(env); end + + class << self + # @api private + # @param type [String] + # @param hash [Hash] + # @return [String] type followed by comma-separated key=value pairs + # + # source://faraday//lib/faraday/request/authorization.rb#34 + def build_hash(type, hash); end + + # @param type [String, Symbol] + # @param token [String, Symbol, Hash] + # @return [String] a header value + # + # source://faraday//lib/faraday/request/authorization.rb#16 + def header(type, token); end + end +end + +# source://faraday//lib/faraday/request/authorization.rb#10 +Faraday::Request::Authorization::KEY = T.let(T.unsafe(nil), String) + +# Authorization middleware for Basic Authentication. +# +# source://faraday//lib/faraday/request/basic_authentication.rb#8 +class Faraday::Request::BasicAuthentication < ::Faraday::Request::Authorization + class << self + # @param login [String] + # @param pass [String] + # @return [String] a Basic Authentication header line + # + # source://faraday//lib/faraday/request/basic_authentication.rb#13 + def header(login, pass); end + end +end + +# Middleware for instrumenting Requests. +# +# source://faraday//lib/faraday/request/instrumentation.rb#6 +class Faraday::Request::Instrumentation < ::Faraday::Middleware + # Instruments requests using Active Support. + # + # Measures time spent only for synchronous requests. + # + # @example Using ActiveSupport::Notifications to measure time spent + # for Faraday requests. + # ActiveSupport::Notifications + # .subscribe('request.faraday') do |name, starts, ends, _, env| + # url = env[:url] + # http_method = env[:method].to_s.upcase + # duration = ends - starts + # $stderr.puts '[%s] %s %s (%.3f s)' % + # [url.host, http_method, url.request_uri, duration] + # end + # @option options + # @option options + # @param app [#call] + # @param options [nil, Hash] Options hash + # @return [Instrumentation] a new instance of Instrumentation + # + # source://faraday//lib/faraday/request/instrumentation.rb#40 + def initialize(app, options = T.unsafe(nil)); end + + # @param env [Faraday::Env] + # + # source://faraday//lib/faraday/request/instrumentation.rb#47 + def call(env); end +end + +# Options class used in Request::Instrumentation class. +# +# source://faraday//lib/faraday/request/instrumentation.rb#8 +class Faraday::Request::Instrumentation::Options < ::Faraday::Options + # @return [Class] + # + # source://faraday//lib/faraday/request/instrumentation.rb#15 + def instrumenter; end + + # @return [String] + # + # source://faraday//lib/faraday/request/instrumentation.rb#10 + def name; end +end + +# source://faraday//lib/faraday.rb#32 +Faraday::Request::Multipart = Faraday::Multipart::Middleware + +# source://faraday//lib/faraday.rb#33 +Faraday::Request::Retry = Faraday::Retry::Middleware + +# TokenAuthentication is a middleware that adds a 'Token' header to a +# Faraday request. +# +# source://faraday//lib/faraday/request/token_authentication.rb#7 +class Faraday::Request::TokenAuthentication < ::Faraday::Request::Authorization + # @return [TokenAuthentication] a new instance of TokenAuthentication + # + # source://faraday//lib/faraday/request/token_authentication.rb#15 + def initialize(app, token, options = T.unsafe(nil)); end + + class << self + # Public + # + # source://faraday//lib/faraday/request/token_authentication.rb#9 + def header(token, options = T.unsafe(nil)); end + end +end + +# Middleware for supporting urlencoded requests. +# +# source://faraday//lib/faraday/request/url_encoded.rb#6 +class Faraday::Request::UrlEncoded < ::Faraday::Middleware + # Encodes as "application/x-www-form-urlencoded" if not already encoded or + # of another type. + # + # @param env [Faraday::Env] + # + # source://faraday//lib/faraday/request/url_encoded.rb#20 + def call(env); end + + # @param env [Faraday::Env] + # @yield [request_body] Body of the request + # + # source://faraday//lib/faraday/request/url_encoded.rb#30 + def match_content_type(env); end + + # @param env [Faraday::Env] + # @return [Boolean] True if the request has a body and its Content-Type is + # urlencoded. + # + # source://faraday//lib/faraday/request/url_encoded.rb#41 + def process_request?(env); end + + # @param env [Faraday::Env] + # @return [String] + # + # source://faraday//lib/faraday/request/url_encoded.rb#49 + def request_type(env); end + + class << self + # Returns the value of attribute mime_type. + # + # source://faraday//lib/faraday/request/url_encoded.rb#12 + def mime_type; end + + # Sets the attribute mime_type + # + # @param value the value to set the attribute mime_type to. + # + # source://faraday//lib/faraday/request/url_encoded.rb#12 + def mime_type=(_arg0); end + end +end + +# source://faraday//lib/faraday/request/url_encoded.rb#8 +Faraday::Request::UrlEncoded::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# RequestOptions contains the configurable properties for a Faraday request. +# +# source://faraday//lib/faraday/options/request_options.rb#8 +class Faraday::RequestOptions < ::Faraday::Options + # source://faraday//lib/faraday/options/request_options.rb#10 + def []=(key, value); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/options/request_options.rb#18 + def stream_response?; end +end + +# Raised by Faraday::Response::RaiseError in case of a 404 response. +# +# source://faraday//lib/faraday/error.rb#101 +class Faraday::ResourceNotFound < ::Faraday::ClientError; end + +# Response represents an HTTP response from making an HTTP request. +# +# source://faraday//lib/faraday/response.rb#7 +class Faraday::Response + extend ::Forwardable + extend ::Faraday::MiddlewareRegistry + extend ::Faraday::AutoloadHelper + + # @return [Response] a new instance of Response + # + # source://faraday//lib/faraday/response.rb#28 + def initialize(env = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def [](*args, **_arg1, &block); end + + # Expand the env with more properties, without overriding existing ones. + # Useful for applying request params after restoring a marshalled Response. + # + # source://faraday//lib/faraday/response.rb#96 + def apply_request(request_env); end + + # source://faraday//lib/faraday/response.rb#49 + def body; end + + # Returns the value of attribute env. + # + # source://faraday//lib/faraday/response.rb#33 + def env; end + + # source://faraday//lib/faraday/response.rb#66 + def finish(env); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/response.rb#53 + def finished?; end + + # source://faraday//lib/faraday/response.rb#43 + def headers; end + + # because @on_complete_callbacks cannot be marshalled + # + # source://faraday//lib/faraday/response.rb#86 + def marshal_dump; end + + # source://faraday//lib/faraday/response.rb#90 + def marshal_load(env); end + + # source://faraday//lib/faraday/response.rb#57 + def on_complete(&block); end + + # source://faraday//lib/faraday/response.rb#39 + def reason_phrase; end + + # source://faraday//lib/faraday/response.rb#35 + def status; end + + # @return [Boolean] + # + # source://faraday//lib/faraday/response.rb#74 + def success?; end + + # source://faraday//lib/faraday/response.rb#78 + def to_hash; end +end + +# Logger is a middleware that logs internal events in the HTTP request +# lifecycle to a given Logger object. By default, this logs to STDOUT. See +# Faraday::Logging::Formatter to see specifically what is logged. +# +# source://faraday//lib/faraday/response/logger.rb#12 +class Faraday::Response::Logger < ::Faraday::Response::Middleware + # @return [Logger] a new instance of Logger + # @yield [@formatter] + # + # source://faraday//lib/faraday/response/logger.rb#13 + def initialize(app, logger = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://faraday//lib/faraday/response/logger.rb#21 + def call(env); end + + # source://faraday//lib/faraday/response/logger.rb#26 + def on_complete(env); end +end + +# Used for simple response middleware. +# +# source://faraday//lib/faraday/response.rb#9 +class Faraday::Response::Middleware < ::Faraday::Middleware + # Override this to modify the environment after the response has finished. + # Calls the `parse` method if defined + # `parse` method can be defined as private, public and protected + # + # source://faraday//lib/faraday/response.rb#13 + def on_complete(env); end +end + +# RaiseError is a Faraday middleware that raises exceptions on common HTTP +# client or server error responses. +# +# source://faraday//lib/faraday/response/raise_error.rb#7 +class Faraday::Response::RaiseError < ::Faraday::Response::Middleware + # source://faraday//lib/faraday/response/raise_error.rb#13 + def on_complete(env); end + + # source://faraday//lib/faraday/response/raise_error.rb#40 + def response_values(env); end +end + +# source://faraday//lib/faraday/response/raise_error.rb#9 +Faraday::Response::RaiseError::ClientErrorStatuses = T.let(T.unsafe(nil), Range) + +# source://faraday//lib/faraday/response/raise_error.rb#10 +Faraday::Response::RaiseError::ServerErrorStatuses = T.let(T.unsafe(nil), Range) + +# A unified client error for SSL errors. +# +# source://faraday//lib/faraday/error.rb#140 +class Faraday::SSLError < ::Faraday::Error; end + +# SSL-related options. +# +# source://faraday//lib/faraday/options/ssl_options.rb#47 +class Faraday::SSLOptions < ::Faraday::Options + # @return [Boolean] true if should not verify + # + # source://faraday//lib/faraday/options/ssl_options.rb#55 + def disable?; end + + # @return [Boolean] true if should verify + # + # source://faraday//lib/faraday/options/ssl_options.rb#50 + def verify?; end +end + +# Faraday server error class. Represents 5xx status responses. +# +# source://faraday//lib/faraday/error.rb#117 +class Faraday::ServerError < ::Faraday::Error; end + +# A unified client error for timeouts. +# +# source://faraday//lib/faraday/error.rb#121 +class Faraday::TimeoutError < ::Faraday::ServerError + # @return [TimeoutError] a new instance of TimeoutError + # + # source://faraday//lib/faraday/error.rb#122 + def initialize(exc = T.unsafe(nil), response = T.unsafe(nil)); end +end + +# source://faraday//lib/faraday.rb#12 +Faraday::Timer = Timeout + +# Raised by Faraday::Response::RaiseError in case of a 401 response. +# +# source://faraday//lib/faraday/error.rb#93 +class Faraday::UnauthorizedError < ::Faraday::ClientError; end + +# Raised by Faraday::Response::RaiseError in case of a 422 response. +# +# source://faraday//lib/faraday/error.rb#113 +class Faraday::UnprocessableEntityError < ::Faraday::ClientError; end + +# Utils contains various static helper methods. +# +# source://faraday//lib/faraday/utils/headers.rb#4 +module Faraday::Utils + private + + # Normalize URI() behavior across Ruby versions + # + # url - A String or URI. + # + # Returns a parsed URI. + # + # source://faraday//lib/faraday/utils.rb#63 + def URI(url); end + + # source://faraday//lib/faraday/utils.rb#15 + def build_nested_query(params); end + + # source://faraday//lib/faraday/utils.rb#11 + def build_query(params); end + + # Recursive hash merge + # + # source://faraday//lib/faraday/utils.rb#109 + def deep_merge(source, hash); end + + # Recursive hash update + # + # source://faraday//lib/faraday/utils.rb#97 + def deep_merge!(target, hash); end + + # source://faraday//lib/faraday/utils.rb#50 + def default_params_encoder; end + + # source://faraday//lib/faraday/utils.rb#19 + def default_space_encoding; end + + # source://faraday//lib/faraday/utils.rb#73 + def default_uri_parser; end + + # source://faraday//lib/faraday/utils.rb#80 + def default_uri_parser=(parser); end + + # source://faraday//lib/faraday/utils.rb#29 + def escape(str); end + + # Receives a String or URI and returns just + # the path with the query string sorted. + # + # source://faraday//lib/faraday/utils.rb#90 + def normalize_path(url); end + + # source://faraday//lib/faraday/utils.rb#46 + def parse_nested_query(query); end + + # Adapted from Rack + # + # source://faraday//lib/faraday/utils.rb#42 + def parse_query(query); end + + # source://faraday//lib/faraday/utils.rb#113 + def sort_query_params(query); end + + # source://faraday//lib/faraday/utils.rb#35 + def unescape(str); end + + class << self + # Normalize URI() behavior across Ruby versions + # + # url - A String or URI. + # + # Returns a parsed URI. + # + # source://faraday//lib/faraday/utils.rb#63 + def URI(url); end + + # source://faraday//lib/faraday/utils.rb#15 + def build_nested_query(params); end + + # source://faraday//lib/faraday/utils.rb#11 + def build_query(params); end + + # Recursive hash merge + # + # source://faraday//lib/faraday/utils.rb#109 + def deep_merge(source, hash); end + + # Recursive hash update + # + # source://faraday//lib/faraday/utils.rb#97 + def deep_merge!(target, hash); end + + # source://faraday//lib/faraday/utils.rb#50 + def default_params_encoder; end + + # Sets the attribute default_params_encoder + # + # @param value the value to set the attribute default_params_encoder to. + # + # source://faraday//lib/faraday/utils.rb#55 + def default_params_encoder=(_arg0); end + + # source://faraday//lib/faraday/utils.rb#19 + def default_space_encoding; end + + # Sets the attribute default_space_encoding + # + # @param value the value to set the attribute default_space_encoding to. + # + # source://faraday//lib/faraday/utils.rb#24 + def default_space_encoding=(_arg0); end + + # source://faraday//lib/faraday/utils.rb#73 + def default_uri_parser; end + + # source://faraday//lib/faraday/utils.rb#80 + def default_uri_parser=(parser); end + + # source://faraday//lib/faraday/utils.rb#29 + def escape(str); end + + # Receives a String or URI and returns just + # the path with the query string sorted. + # + # source://faraday//lib/faraday/utils.rb#90 + def normalize_path(url); end + + # source://faraday//lib/faraday/utils.rb#46 + def parse_nested_query(query); end + + # Adapted from Rack + # + # source://faraday//lib/faraday/utils.rb#42 + def parse_query(query); end + + # source://faraday//lib/faraday/utils.rb#113 + def sort_query_params(query); end + + # source://faraday//lib/faraday/utils.rb#35 + def unescape(str); end + end +end + +# source://faraday//lib/faraday/utils.rb#39 +Faraday::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# source://faraday//lib/faraday/utils.rb#27 +Faraday::Utils::ESCAPE_RE = T.let(T.unsafe(nil), Regexp) + +# A case-insensitive Hash that preserves the original case of a header +# when set. +# +# Adapted from Rack::Utils::HeaderHash +# +# source://faraday//lib/faraday/utils/headers.rb#9 +class Faraday::Utils::Headers < ::Hash + # @return [Headers] a new instance of Headers + # + # source://faraday//lib/faraday/utils/headers.rb#20 + def initialize(hash = T.unsafe(nil)); end + + # source://faraday//lib/faraday/utils/headers.rb#52 + def [](key); end + + # source://faraday//lib/faraday/utils/headers.rb#57 + def []=(key, val); end + + # source://faraday//lib/faraday/utils/headers.rb#71 + def delete(key); end + + # source://faraday//lib/faraday/utils/headers.rb#65 + def fetch(key, *args, &block); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/headers.rb#80 + def has_key?(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/headers.rb#80 + def include?(key); end + + # source://faraday//lib/faraday/utils/headers.rb#26 + def initialize_names; end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/headers.rb#80 + def key?(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/headers.rb#80 + def member?(key); end + + # source://faraday//lib/faraday/utils/headers.rb#95 + def merge(other); end + + # source://faraday//lib/faraday/utils/headers.rb#88 + def merge!(other); end + + # source://faraday//lib/faraday/utils/headers.rb#111 + def parse(header_string); end + + # source://faraday//lib/faraday/utils/headers.rb#100 + def replace(other); end + + # source://faraday//lib/faraday/utils/headers.rb#107 + def to_hash; end + + # source://faraday//lib/faraday/utils/headers.rb#88 + def update(other); end + + protected + + # Returns the value of attribute names. + # + # source://faraday//lib/faraday/utils/headers.rb#129 + def names; end + + private + + # Join multiple values with a comma. + # + # source://faraday//lib/faraday/utils/headers.rb#134 + def add_parsed(key, value); end + + # on dup/clone, we need to duplicate @names hash + # + # source://faraday//lib/faraday/utils/headers.rb#31 + def initialize_copy(other); end + + class << self + # source://faraday//lib/faraday/utils/headers.rb#14 + def allocate; end + + # source://faraday//lib/faraday/utils/headers.rb#10 + def from(value); end + end +end + +# symbol -> string mapper + cache +# +# source://faraday//lib/faraday/utils/headers.rb#40 +Faraday::Utils::Headers::KeyMap = T.let(T.unsafe(nil), Hash) + +# A hash with stringified keys. +# +# source://faraday//lib/faraday/utils/params_hash.rb#6 +class Faraday::Utils::ParamsHash < ::Hash + # source://faraday//lib/faraday/utils/params_hash.rb#7 + def [](key); end + + # source://faraday//lib/faraday/utils/params_hash.rb#11 + def []=(key, value); end + + # source://faraday//lib/faraday/utils/params_hash.rb#15 + def delete(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/params_hash.rb#19 + def has_key?(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/params_hash.rb#19 + def include?(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/params_hash.rb#19 + def key?(key); end + + # @return [Boolean] + # + # source://faraday//lib/faraday/utils/params_hash.rb#19 + def member?(key); end + + # source://faraday//lib/faraday/utils/params_hash.rb#35 + def merge(params); end + + # source://faraday//lib/faraday/utils/params_hash.rb#27 + def merge!(params); end + + # source://faraday//lib/faraday/utils/params_hash.rb#44 + def merge_query(query, encoder = T.unsafe(nil)); end + + # source://faraday//lib/faraday/utils/params_hash.rb#39 + def replace(other); end + + # source://faraday//lib/faraday/utils/params_hash.rb#50 + def to_query(encoder = T.unsafe(nil)); end + + # source://faraday//lib/faraday/utils/params_hash.rb#27 + def update(params); end + + private + + # source://faraday//lib/faraday/utils/params_hash.rb#56 + def convert_key(key); end +end + +# source://faraday//lib/faraday/version.rb#4 +Faraday::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi b/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi new file mode 100644 index 000000000..47e24c328 --- /dev/null +++ b/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi @@ -0,0 +1,1003 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `faraday_middleware` gem. +# Please instead update this file by running `bin/tapioca gem faraday_middleware`. + +# source://faraday_middleware//lib/faraday_middleware/backwards_compatibility.rb#3 +module Faraday + class << self + # source://faraday/1.10.3/lib/faraday.rb#81 + def default_adapter; end + + # source://faraday/1.10.3/lib/faraday.rb#137 + def default_adapter=(adapter); end + + # source://faraday/1.10.3/lib/faraday.rb#155 + def default_connection; end + + # source://faraday/1.10.3/lib/faraday.rb#84 + def default_connection=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#162 + def default_connection_options; end + + # source://faraday/1.10.3/lib/faraday.rb#169 + def default_connection_options=(options); end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy; end + + # source://faraday/1.10.3/lib/faraday.rb#89 + def ignore_env_proxy=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path; end + + # source://faraday/1.10.3/lib/faraday.rb#72 + def lib_path=(_arg0); end + + # source://faraday/1.10.3/lib/faraday.rb#118 + def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_lib(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#128 + def require_libs(*libs); end + + # source://faraday/1.10.3/lib/faraday.rb#142 + def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path; end + + # source://faraday/1.10.3/lib/faraday.rb#68 + def root_path=(_arg0); end + + private + + # source://faraday/1.10.3/lib/faraday.rb#178 + def method_missing(name, *args, &block); end + end +end + +# Autoload classes for Faraday::Request. +# +# source://faraday_middleware//lib/faraday_middleware/backwards_compatibility.rb#5 +class Faraday::Request < ::Struct + # source://faraday/1.10.3/lib/faraday/request.rb#112 + def [](key); end + + # source://faraday/1.10.3/lib/faraday/request.rb#118 + def []=(key, value); end + + # source://faraday/1.10.3/lib/faraday/request.rb#60 + def _deprecated_method; end + + # source://faraday/1.10.3/lib/faraday/request.rb#81 + def headers=(hash); end + + # source://faraday/1.10.3/lib/faraday/request.rb#125 + def marshal_dump; end + + # source://faraday/1.10.3/lib/faraday/request.rb#139 + def marshal_load(serialised); end + + # source://faraday/1.10.3/lib/faraday/deprecate.rb#86 + def method(*args, &block); end + + # source://faraday/1.10.3/lib/faraday/request.rb#70 + def params=(hash); end + + # source://faraday/1.10.3/lib/faraday/request.rb#149 + def to_env(connection); end + + # source://faraday/1.10.3/lib/faraday/request.rb#94 + def url(path, params = T.unsafe(nil)); end + + class << self + # source://faraday/1.10.3/lib/faraday/request.rb#54 + def create(request_method); end + end +end + +# deprecated alias +# +# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#90 +Faraday::Request::OAuth = FaradayMiddleware::OAuth + +# deprecated alias +# +# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#88 +Faraday::Request::OAuth2 = FaradayMiddleware::OAuth2 + +class Faraday::RequestOptions < ::Faraday::Options + include ::FaradayMiddleware::OptionsExtension +end + +# Autoload classes for Faraday::Request. +# +# source://faraday_middleware//lib/faraday_middleware/backwards_compatibility.rb#11 +class Faraday::Response + # source://faraday/1.10.3/lib/faraday/response.rb#28 + def initialize(env = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def [](*args, **_arg1, &block); end + + # source://faraday/1.10.3/lib/faraday/response.rb#96 + def apply_request(request_env); end + + # source://faraday/1.10.3/lib/faraday/response.rb#49 + def body; end + + # source://faraday/1.10.3/lib/faraday/response.rb#33 + def env; end + + # source://faraday/1.10.3/lib/faraday/response.rb#66 + def finish(env); end + + # source://faraday/1.10.3/lib/faraday/response.rb#53 + def finished?; end + + # source://faraday/1.10.3/lib/faraday/response.rb#43 + def headers; end + + # source://faraday/1.10.3/lib/faraday/response.rb#86 + def marshal_dump; end + + # source://faraday/1.10.3/lib/faraday/response.rb#90 + def marshal_load(env); end + + # source://faraday/1.10.3/lib/faraday/response.rb#57 + def on_complete(&block); end + + # source://faraday/1.10.3/lib/faraday/response.rb#39 + def reason_phrase; end + + # source://faraday/1.10.3/lib/faraday/response.rb#35 + def status; end + + # source://faraday/1.10.3/lib/faraday/response.rb#74 + def success?; end + + # source://faraday/1.10.3/lib/faraday/response.rb#78 + def to_hash; end +end + +# deprecated alias +# +# source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#39 +Faraday::Response::Mashify = FaradayMiddleware::Mashify + +# deprecated alias +# +# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#50 +Faraday::Response::ParseJson = FaradayMiddleware::ParseJson + +# deprecated alias +# +# source://faraday_middleware//lib/faraday_middleware/response/parse_marshal.rb#15 +Faraday::Response::ParseMarshal = FaradayMiddleware::ParseMarshal + +# deprecated alias +# +# source://faraday_middleware//lib/faraday_middleware/response/parse_xml.rb#17 +Faraday::Response::ParseXml = FaradayMiddleware::ParseXml + +# deprecated alias +# +# source://faraday_middleware//lib/faraday_middleware/response/parse_yaml.rb#39 +Faraday::Response::ParseYaml = FaradayMiddleware::ParseYaml + +# deprecated alias +# +# source://faraday_middleware//lib/faraday_middleware/response/rashify.rb#17 +Faraday::Response::Rashify = FaradayMiddleware::Rashify + +# Main FaradayMiddleware module. +# +# source://faraday_middleware//lib/faraday_middleware.rb#6 +module FaradayMiddleware; end + +# Public: Caches GET responses and pulls subsequent ones from the cache. +# +# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#9 +class FaradayMiddleware::Caching < ::Faraday::Middleware + extend ::Forwardable + + # Public: initialize the middleware. + # + # cache - An object that responds to read and write (default: nil). + # options - An options Hash (default: {}): + # :ignore_params - String name or Array names of query + # params that should be ignored when forming + # the cache key (default: []). + # :write_options - Hash of settings that should be passed as the + # third options parameter to the cache's #write + # method. If not specified, no options parameter + # will be passed. + # :full_key - Boolean - use full URL as cache key: + # (url.host + url.request_uri) + # :status_codes - Array of http status code to be cache + # (default: CACHEABLE_STATUS_CODE) + # + # Yields if no cache is given. The block should return a cache object. + # + # @return [Caching] a new instance of Caching + # + # source://faraday_middleware//lib/faraday_middleware/response/caching.rb#42 + def initialize(app, cache = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def build_query(*args, **_arg1, &block); end + + # Returns the value of attribute cache. + # + # source://faraday_middleware//lib/faraday_middleware/response/caching.rb#10 + def cache; end + + # source://faraday_middleware//lib/faraday_middleware/response/caching.rb#71 + def cache_key(env); end + + # source://faraday_middleware//lib/faraday_middleware/response/caching.rb#98 + def cache_on_complete(env); end + + # source://faraday_middleware//lib/faraday_middleware/response/caching.rb#52 + def call(env); end + + # source://faraday_middleware//lib/faraday_middleware/response/caching.rb#91 + def custom_status_codes; end + + # source://faraday_middleware//lib/faraday_middleware/response/caching.rb#122 + def finalize_response(response, env); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response/caching.rb#87 + def full_key?; end + + # source://faraday_middleware//lib/faraday_middleware/response/caching.rb#83 + def params_to_ignore; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def parse_query(*args, **_arg1, &block); end + + # source://faraday_middleware//lib/faraday_middleware/response/caching.rb#112 + def store_response_in_cache(key, response); end +end + +# Internal: List of status codes that can be cached: +# * 200 - 'OK' +# * 203 - 'Non-Authoritative Information' +# * 300 - 'Multiple Choices' +# * 301 - 'Moved Permanently' +# * 302 - 'Found' +# * 404 - 'Not Found' +# * 410 - 'Gone' +# +# source://faraday_middleware//lib/faraday_middleware/response/caching.rb#20 +FaradayMiddleware::Caching::CACHEABLE_STATUS_CODES = T.let(T.unsafe(nil), Array) + +# Public: Parse a Transfer-Encoding. Chunks response to just the original data +# +# source://faraday_middleware//lib/faraday_middleware/response/chunked.rb#7 +class FaradayMiddleware::Chunked < ::FaradayMiddleware::ResponseMiddleware + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response/chunked.rb#28 + def chunked_encoding?(headers); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response/chunked.rb#24 + def parse_response?(env); end +end + +# source://faraday_middleware//lib/faraday_middleware/response/chunked.rb#8 +FaradayMiddleware::Chunked::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) + +# Request middleware that encodes the body as JSON. +# +# Processes only requests with matching Content-type or those without a type. +# If a request doesn't have a type but has a body, it sets the Content-type +# to JSON MIME-type. +# +# Doesn't try to encode bodies that already are in string form. +# +# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#13 +class FaradayMiddleware::EncodeJson < ::Faraday::Middleware + # source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#22 + def call(env); end + + # source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#29 + def encode(data); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#45 + def has_body?(env); end + + # @yield [] + # + # source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#33 + def match_content_type(env); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#40 + def process_request?(env); end + + # source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#49 + def request_type(env); end +end + +# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#14 +FaradayMiddleware::EncodeJson::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#15 +FaradayMiddleware::EncodeJson::MIME_TYPE = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/request/encode_json.rb#16 +FaradayMiddleware::EncodeJson::MIME_TYPE_REGEX = T.let(T.unsafe(nil), Regexp) + +# Public: Follow HTTP 301, 302, 303, 307, and 308 redirects. +# +# For HTTP 301, 302, and 303, the original GET, POST, PUT, DELETE, or PATCH +# request gets converted into a GET. With `:standards_compliant => true`, +# however, the HTTP method after 301/302 remains unchanged. This allows you +# to opt into HTTP/1.1 compliance and act unlike the major web browsers. +# +# This middleware currently only works with synchronous requests; i.e. it +# doesn't support parallelism. +# +# If you wish to persist cookies across redirects, you could use +# the faraday-cookie_jar gem: +# +# Faraday.new(:url => url) do |faraday| +# faraday.use FaradayMiddleware::FollowRedirects +# faraday.use :cookie_jar +# faraday.adapter Faraday.default_adapter +# end +# +# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#25 +class FaradayMiddleware::FollowRedirects < ::Faraday::Middleware + # Public: Initialize the middleware. + # + # options - An options Hash (default: {}): + # :limit - A Numeric redirect limit (default: 3) + # :standards_compliant - A Boolean indicating whether to respect + # the HTTP spec when following 301/302 + # (default: false) + # :callback - A callable used on redirects + # with the old and new envs + # :cookies - An Array of Strings (e.g. + # ['cookie1', 'cookie2']) to choose + # cookies to be kept, or :all to keep + # all cookies (default: []). + # :clear_authorization_header - A Boolean indicating whether the request + # Authorization header should be cleared on + # redirects (default: true) + # + # @return [FollowRedirects] a new instance of FollowRedirects + # + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#58 + def initialize(app, options = T.unsafe(nil)); end + + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#66 + def call(env); end + + private + + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#125 + def callback; end + + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#140 + def clear_authorization_header(env, from_url, to_url); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#72 + def convert_to_get?(response); end + + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#117 + def follow_limit; end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#112 + def follow_redirect?(env, response); end + + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#77 + def perform_with_redirection(env, follows); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#147 + def redirect_to_same_host?(from_url, to_url); end + + # Internal: escapes unsafe characters from an URL which might be a path + # component only or a fully qualified URI so that it can be joined onto an + # URI:HTTP using the `+` operator. Doesn't escape "%" characters so to not + # risk double-escaping. + # + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#133 + def safe_escape(uri); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#121 + def standards_compliant?; end + + # source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#93 + def update_env(env, request_body, response); end +end + +# HTTP methods for which 30x redirects can be followed +# +# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#27 +FaradayMiddleware::FollowRedirects::ALLOWED_METHODS = T.let(T.unsafe(nil), Set) + +# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#40 +FaradayMiddleware::FollowRedirects::AUTH_HEADER = T.let(T.unsafe(nil), String) + +# Keys in env hash which will get cleared between requests +# +# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#31 +FaradayMiddleware::FollowRedirects::ENV_TO_CLEAR = T.let(T.unsafe(nil), Set) + +# Default value for max redirects followed +# +# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#34 +FaradayMiddleware::FollowRedirects::FOLLOW_LIMIT = T.let(T.unsafe(nil), Integer) + +# HTTP redirect status codes that this middleware implements +# +# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#29 +FaradayMiddleware::FollowRedirects::REDIRECT_CODES = T.let(T.unsafe(nil), Set) + +# Regex that matches characters that need to be escaped in URLs, sans +# the "%" character which we assume already represents an escaped sequence. +# +# source://faraday_middleware//lib/faraday_middleware/response/follow_redirects.rb#38 +FaradayMiddleware::FollowRedirects::URI_UNSAFE = T.let(T.unsafe(nil), Regexp) + +# Middleware to automatically decompress response bodies. If the +# "Accept-Encoding" header wasn't set in the request, this sets it to +# "gzip,deflate" and appropriately handles the compressed response from the +# server. This resembles what Ruby 1.9+ does internally in Net::HTTP#get. +# +# This middleware is NOT necessary when these adapters are used: +# - net_http on Ruby 1.9+ +# - net_http_persistent on Ruby 2.0+ +# - em_http +# +# source://faraday_middleware//lib/faraday_middleware/gzip.rb#15 +class FaradayMiddleware::Gzip < ::Faraday::Middleware + # source://faraday_middleware//lib/faraday_middleware/gzip.rb#82 + def brotli_inflate(body); end + + # source://faraday_middleware//lib/faraday_middleware/gzip.rb#38 + def call(env); end + + # source://faraday_middleware//lib/faraday_middleware/gzip.rb#68 + def inflate(body); end + + # source://faraday_middleware//lib/faraday_middleware/gzip.rb#86 + def raw_body(body); end + + # source://faraday_middleware//lib/faraday_middleware/gzip.rb#56 + def reset_body(env); end + + # source://faraday_middleware//lib/faraday_middleware/gzip.rb#62 + def uncompress_gzip(body); end + + class << self + # source://faraday_middleware//lib/faraday_middleware/gzip.rb#18 + def optional_dependency(lib = T.unsafe(nil)); end + + # source://faraday_middleware//lib/faraday_middleware/gzip.rb#27 + def supported_encodings; end + end +end + +# source://faraday_middleware//lib/faraday_middleware/gzip.rb#33 +FaradayMiddleware::Gzip::ACCEPT_ENCODING = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/gzip.rb#25 +FaradayMiddleware::Gzip::BROTLI_SUPPORTED = T.let(T.unsafe(nil), FalseClass) + +# source://faraday_middleware//lib/faraday_middleware/gzip.rb#34 +FaradayMiddleware::Gzip::CONTENT_ENCODING = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/gzip.rb#35 +FaradayMiddleware::Gzip::CONTENT_LENGTH = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/gzip.rb#36 +FaradayMiddleware::Gzip::SUPPORTED_ENCODINGS = T.let(T.unsafe(nil), String) + +# Public: Instruments requests using Active Support. +# +# Measures time spent only for synchronous requests. +# +# Examples +# +# ActiveSupport::Notifications. +# subscribe('request.faraday') do |name, starts, ends, _, env| +# url = env[:url] +# http_method = env[:method].to_s.upcase +# duration = ends - starts +# $stderr.puts '[%s] %s %s (%.3f s)' % [url.host, +# http_method, +# url.request_uri, +# duration] +# end +# +# source://faraday_middleware//lib/faraday_middleware/instrumentation.rb#22 +class FaradayMiddleware::Instrumentation < ::Faraday::Middleware + # @return [Instrumentation] a new instance of Instrumentation + # + # source://faraday_middleware//lib/faraday_middleware/instrumentation.rb#25 + def initialize(app, options = T.unsafe(nil)); end + + # source://faraday_middleware//lib/faraday_middleware/instrumentation.rb#30 + def call(env); end +end + +# Public: Converts parsed response bodies to a Hashie::Mash if they were of +# Hash or Array type. +# +# source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#8 +class FaradayMiddleware::Mashify < ::Faraday::Response::Middleware + # @return [Mashify] a new instance of Mashify + # + # source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#20 + def initialize(app = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute mash_class. + # + # source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#9 + def mash_class; end + + # Sets the attribute mash_class + # + # @param value the value to set the attribute mash_class to. + # + # source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#9 + def mash_class=(_arg0); end + + # source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#25 + def parse(body); end + + class << self + # Returns the value of attribute mash_class. + # + # source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#12 + def mash_class; end + + # Sets the attribute mash_class + # + # @param value the value to set the attribute mash_class to. + # + # source://faraday_middleware//lib/faraday_middleware/response/mashify.rb#12 + def mash_class=(_arg0); end + end +end + +# Public: Writes the original HTTP method to "X-Http-Method-Override" header +# and sends the request as POST. +# +# This can be used to work around technical issues with making non-POST +# requests, e.g. faulty HTTP client or server router. +# +# This header is recognized in Rack apps by default, courtesy of the +# Rack::MethodOverride module. See +# http://rack.rubyforge.org/doc/classes/Rack/MethodOverride.html +# +# source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#15 +class FaradayMiddleware::MethodOverride < ::Faraday::Middleware + # Public: Initialize the middleware. + # + # app - the Faraday app to wrap + # options - (optional) + # :rewrite - Array of HTTP methods to rewrite + # (default: all but GET and POST) + # + # @return [MethodOverride] a new instance of MethodOverride + # + # source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#24 + def initialize(app, options = T.unsafe(nil)); end + + # source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#32 + def call(env); end + + # Internal: Write the original HTTP method to header, change method to POST. + # + # source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#47 + def rewrite_request(env, original_method); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#38 + def rewrite_request?(method); end +end + +# source://faraday_middleware//lib/faraday_middleware/request/method_override.rb#16 +FaradayMiddleware::MethodOverride::HEADER = T.let(T.unsafe(nil), String) + +# Public: Uses the simple_oauth library to sign requests according the +# OAuth protocol. +# +# The options for this middleware are forwarded to SimpleOAuth::Header: +# :consumer_key, :consumer_secret, :token, :token_secret. All these +# parameters are optional. +# +# The signature is added to the "Authorization" HTTP request header. If the +# value for this header already exists, it is not overriden. +# +# If no Content-Type header is specified, this middleware assumes that +# request body parameters should be included while signing the request. +# Otherwise, it only includes them if the Content-Type is +# "application/x-www-form-urlencoded", as per OAuth 1.0. +# +# For better performance while signing requests, this middleware should be +# positioned before UrlEncoded middleware on the stack, but after any other +# body-encoding middleware (such as EncodeJson). +# +# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#25 +class FaradayMiddleware::OAuth < ::Faraday::Middleware + extend ::Forwardable + + # @return [OAuth] a new instance of OAuth + # + # source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#35 + def initialize(app, options); end + + # source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#64 + def body_params(env); end + + # source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#40 + def call(env); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#74 + def include_body_params?(env); end + + # source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#45 + def oauth_header(env); end + + # source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#56 + def oauth_options(env); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def parse_nested_query(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#52 + def sign_request?(env); end + + # source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#79 + def signature_params(params); end +end + +# Public: A simple middleware that adds an access token to each request. +# +# By default, the token is added as both "access_token" query parameter +# and the "Authorization" HTTP request header. It can alternatively be +# added exclusively as a bearer token "Authorization" header by specifying +# a "token_type" option of "bearer". However, an explicit "access_token" +# parameter or "Authorization" header for the current request are not +# overriden. +# +# Examples +# +# # configure default token: +# OAuth2.new(app, 'abc123') +# +# # configure query parameter name: +# OAuth2.new(app, 'abc123', :param_name => 'my_oauth_token') +# +# # use bearer token authorization header only +# OAuth2.new(app, 'abc123', :token_type => 'bearer') +# +# # default token value is optional: +# OAuth2.new(app, :param_name => 'my_oauth_token') +# +# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#29 +class FaradayMiddleware::OAuth2 < ::Faraday::Middleware + extend ::Forwardable + + # @raise [ArgumentError] + # @return [OAuth2] a new instance of OAuth2 + # + # source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#56 + def initialize(app, token = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def build_query(*args, **_arg1, &block); end + + # source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#39 + def call(env); end + + # Returns the value of attribute param_name. + # + # source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#34 + def param_name; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def parse_query(*args, **_arg1, &block); end + + # source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#77 + def query_params(url); end + + # Returns the value of attribute token_type. + # + # source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#34 + def token_type; end +end + +# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#32 +FaradayMiddleware::OAuth2::AUTH_HEADER = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#30 +FaradayMiddleware::OAuth2::PARAM_NAME = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/request/oauth2.rb#31 +FaradayMiddleware::OAuth2::TOKEN_TYPE = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#28 +FaradayMiddleware::OAuth::AUTH_HEADER = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#29 +FaradayMiddleware::OAuth::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/request/oauth.rb#30 +FaradayMiddleware::OAuth::TYPE_URLENCODED = T.let(T.unsafe(nil), String) + +# DRAGONS +# +# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#88 +module FaradayMiddleware::OptionsExtension + # @yield [:preserve_raw, preserve_raw] + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#95 + def each; end + + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#102 + def fetch(key, *args); end + + # Returns the value of attribute preserve_raw. + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#89 + def preserve_raw; end + + # Sets the attribute preserve_raw + # + # @param value the value to set the attribute preserve_raw to. + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#89 + def preserve_raw=(_arg0); end + + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#91 + def to_hash; end +end + +# Parse dates from response body +# +# source://faraday_middleware//lib/faraday_middleware/response/parse_dates.rb#8 +class FaradayMiddleware::ParseDates < ::Faraday::Response::Middleware + # @return [ParseDates] a new instance of ParseDates + # + # source://faraday_middleware//lib/faraday_middleware/response/parse_dates.rb#12 + def initialize(app, options = T.unsafe(nil)); end + + # source://faraday_middleware//lib/faraday_middleware/response/parse_dates.rb#17 + def call(env); end + + private + + # source://faraday_middleware//lib/faraday_middleware/response/parse_dates.rb#25 + def parse_dates!(value); end +end + +# source://faraday_middleware//lib/faraday_middleware/response/parse_dates.rb#9 +FaradayMiddleware::ParseDates::ISO_DATE_FORMAT = T.let(T.unsafe(nil), Regexp) + +# Public: Parse response bodies as JSON. +# +# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#7 +class FaradayMiddleware::ParseJson < ::FaradayMiddleware::ResponseMiddleware; end + +# Public: Override the content-type of the response with "application/json" +# if the response body looks like it might be JSON, i.e. starts with an +# open bracket. +# +# This is to fix responses from certain API providers that insist on serving +# JSON with wrong MIME-types such as "text/javascript". +# +# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#22 +class FaradayMiddleware::ParseJson::MimeTypeFix < ::FaradayMiddleware::ResponseMiddleware + # source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#39 + def first_char(body); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#35 + def parse_response?(env); end + + # source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#25 + def process_response(env); end +end + +# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#32 +FaradayMiddleware::ParseJson::MimeTypeFix::BRACKETS = T.let(T.unsafe(nil), Array) + +# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#23 +FaradayMiddleware::ParseJson::MimeTypeFix::MIME_TYPE = T.let(T.unsafe(nil), String) + +# source://faraday_middleware//lib/faraday_middleware/response/parse_json.rb#33 +FaradayMiddleware::ParseJson::MimeTypeFix::WHITESPACE = T.let(T.unsafe(nil), Array) + +# Public: Restore marshalled Ruby objects in response bodies. +# +# source://faraday_middleware//lib/faraday_middleware/response/parse_marshal.rb#7 +class FaradayMiddleware::ParseMarshal < ::FaradayMiddleware::ResponseMiddleware; end + +# Public: parses response bodies with MultiXml. +# +# source://faraday_middleware//lib/faraday_middleware/response/parse_xml.rb#7 +class FaradayMiddleware::ParseXml < ::FaradayMiddleware::ResponseMiddleware; end + +# Public: Parse response bodies as YAML. +# +# Warning: This is not backwards compatible with versions of this middleware +# prior to faraday_middleware v0.12 - prior to this version, we used +# YAML.load rather than YAMl.safe_load, which exposes serious remote code +# execution risks - see https://github.com/ruby/psych/issues/119 for details. +# If you're sure you can trust YAML you're passing, you can set up an unsafe +# version of this middleware like this: +# +# class UnsafelyParseYaml < FaradayMiddleware::ResponseMiddleware +# dependency do +# require 'yaml' +# end +# +# define_parser do |body| +# YAML.load body +# end +# end +# +# Faraday.new(..) do |config| +# config.use UnsafelyParseYaml +# ... +# end +# +# source://faraday_middleware//lib/faraday_middleware/response/parse_yaml.rb#29 +class FaradayMiddleware::ParseYaml < ::FaradayMiddleware::ResponseMiddleware; end + +# Wraps a handler originally written for Rack for Faraday compatibility. +# +# Experimental. Only handles changes in request headers. +# +# source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#9 +class FaradayMiddleware::RackCompatible + # @return [RackCompatible] a new instance of RackCompatible + # + # source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#10 + def initialize(app, rack_handler, *args); end + + # source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#21 + def call(env); end + + # source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#80 + def finalize_response(env, rack_response); end + + # source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#50 + def headers_to_rack(env); end + + # faraday to rack-compatible + # + # source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#30 + def prepare_env(faraday_env); end + + # rack to faraday-compatible + # + # source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#61 + def restore_env(rack_env); end +end + +# source://faraday_middleware//lib/faraday_middleware/rack_compatible.rb#27 +FaradayMiddleware::RackCompatible::NON_PREFIXED_HEADERS = T.let(T.unsafe(nil), Array) + +# Public: Converts parsed response bodies to a Hashie::Rash if they were of +# Hash or Array type. +# +# source://faraday_middleware//lib/faraday_middleware/response/rashify.rb#8 +class FaradayMiddleware::Rashify < ::FaradayMiddleware::Mashify; end + +# Exception thrown when the maximum amount of requests is +# exceeded. +# +# source://faraday_middleware//lib/faraday_middleware/redirect_limit_reached.rb#8 +class FaradayMiddleware::RedirectLimitReached < ::Faraday::ClientError + # @return [RedirectLimitReached] a new instance of RedirectLimitReached + # + # source://faraday_middleware//lib/faraday_middleware/redirect_limit_reached.rb#11 + def initialize(response); end + + # Returns the value of attribute response. + # + # source://faraday_middleware//lib/faraday_middleware/redirect_limit_reached.rb#9 + def response; end +end + +# Internal: The base class for middleware that parses responses. +# +# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#8 +class FaradayMiddleware::ResponseMiddleware < ::Faraday::Middleware + # @return [ResponseMiddleware] a new instance of ResponseMiddleware + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#28 + def initialize(app = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#35 + def call(environment); end + + # Parse the response body. + # + # Instead of overriding this method, consider using `define_parser`. + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#51 + def parse(body); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#78 + def parse_response?(env); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#82 + def preserve_raw?(env); end + + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#41 + def process_response(env); end + + # @return [Boolean] + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#72 + def process_response_type?(type); end + + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#66 + def response_type(env); end + + class << self + # Store a Proc that receives the body and returns the parsed result. + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#16 + def define_parser(parser = T.unsafe(nil), &block); end + + # @private + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#22 + def inherited(subclass); end + + # Returns the value of attribute parser. + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#12 + def parser; end + + # Sets the attribute parser + # + # @param value the value to set the attribute parser to. + # + # source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#12 + def parser=(_arg0); end + end +end + +# source://faraday_middleware//lib/faraday_middleware/response_middleware.rb#9 +FaradayMiddleware::ResponseMiddleware::CONTENT_TYPE = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/json_api_client@1.21.1.rbi b/sorbet/rbi/gems/json_api_client@1.21.1.rbi new file mode 100644 index 000000000..96fb695ee --- /dev/null +++ b/sorbet/rbi/gems/json_api_client@1.21.1.rbi @@ -0,0 +1,2520 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `json_api_client` gem. +# Please instead update this file by running `bin/tapioca gem json_api_client`. + +# source://json_api_client//lib/json_api_client/formatter.rb#5 +module JsonApiClient; end + +# source://json_api_client//lib/json_api_client/associations.rb#2 +module JsonApiClient::Associations; end + +# source://json_api_client//lib/json_api_client/associations/base_association.rb#3 +class JsonApiClient::Associations::BaseAssociation + # @return [BaseAssociation] a new instance of BaseAssociation + # + # source://json_api_client//lib/json_api_client/associations/base_association.rb#5 + def initialize(attr_name, klass, options = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/associations/base_association.rb#11 + def association_class; end + + # Returns the value of attribute attr_name. + # + # source://json_api_client//lib/json_api_client/associations/base_association.rb#4 + def attr_name; end + + # source://json_api_client//lib/json_api_client/associations/base_association.rb#17 + def data(url); end + + # source://json_api_client//lib/json_api_client/associations/base_association.rb#21 + def from_result_set(result_set); end + + # Returns the value of attribute klass. + # + # source://json_api_client//lib/json_api_client/associations/base_association.rb#4 + def klass; end + + # source://json_api_client//lib/json_api_client/associations/base_association.rb#25 + def load_records(data); end + + # Returns the value of attribute options. + # + # source://json_api_client//lib/json_api_client/associations/base_association.rb#4 + def options; end +end + +# source://json_api_client//lib/json_api_client/associations/belongs_to.rb#3 +module JsonApiClient::Associations::BelongsTo; end + +# source://json_api_client//lib/json_api_client/associations/belongs_to.rb#4 +class JsonApiClient::Associations::BelongsTo::Association < ::JsonApiClient::Associations::BaseAssociation + include ::JsonApiClient::Helpers::URI + + # @return [Association] a new instance of Association + # + # source://json_api_client//lib/json_api_client/associations/belongs_to.rb#9 + def initialize(attr_name, klass, options = T.unsafe(nil)); end + + # Returns the value of attribute param. + # + # source://json_api_client//lib/json_api_client/associations/belongs_to.rb#7 + def param; end + + # source://json_api_client//lib/json_api_client/associations/belongs_to.rb#23 + def set_prefix_path(attrs, formatter); end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/associations/belongs_to.rb#15 + def shallow_path?; end + + # source://json_api_client//lib/json_api_client/associations/belongs_to.rb#19 + def to_prefix_path(formatter); end +end + +# source://json_api_client//lib/json_api_client/associations/has_many.rb#3 +module JsonApiClient::Associations::HasMany; end + +# source://json_api_client//lib/json_api_client/associations/has_many.rb#4 +class JsonApiClient::Associations::HasMany::Association < ::JsonApiClient::Associations::BaseAssociation; end + +# source://json_api_client//lib/json_api_client/associations/has_one.rb#3 +module JsonApiClient::Associations::HasOne; end + +# source://json_api_client//lib/json_api_client/associations/has_one.rb#4 +class JsonApiClient::Associations::HasOne::Association < ::JsonApiClient::Associations::BaseAssociation + # source://json_api_client//lib/json_api_client/associations/has_one.rb#5 + def from_result_set(result_set); end + + # source://json_api_client//lib/json_api_client/associations/has_one.rb#9 + def load_records(data); end +end + +# source://json_api_client//lib/json_api_client/formatter.rb#77 +class JsonApiClient::CamelizedKeyFormatter < ::JsonApiClient::KeyFormatter + class << self + # source://json_api_client//lib/json_api_client/formatter.rb#79 + def format(key); end + + # source://json_api_client//lib/json_api_client/formatter.rb#83 + def unformat(formatted_key); end + end +end + +# source://json_api_client//lib/json_api_client/formatter.rb#121 +class JsonApiClient::CamelizedRouteFormatter < ::JsonApiClient::RouteFormatter + class << self + # source://json_api_client//lib/json_api_client/formatter.rb#123 + def format(route); end + + # source://json_api_client//lib/json_api_client/formatter.rb#127 + def unformat(formatted_route); end + end +end + +# source://json_api_client//lib/json_api_client/connection.rb#2 +class JsonApiClient::Connection + # @return [Connection] a new instance of Connection + # @yield [_self] + # @yieldparam _self [JsonApiClient::Connection] the object that the method was called on + # + # source://json_api_client//lib/json_api_client/connection.rb#6 + def initialize(options = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/connection.rb#30 + def delete(middleware); end + + # Returns the value of attribute faraday. + # + # source://json_api_client//lib/json_api_client/connection.rb#4 + def faraday; end + + # source://json_api_client//lib/json_api_client/connection.rb#34 + def run(request_method, path, params: T.unsafe(nil), headers: T.unsafe(nil), body: T.unsafe(nil)); end + + # insert middleware before ParseJson - middleware executed in reverse order - + # inserted middleware will run after json parsed + # + # source://json_api_client//lib/json_api_client/connection.rb#25 + def use(middleware, *args, &block); end +end + +# source://json_api_client//lib/json_api_client/formatter.rb#89 +class JsonApiClient::DasherizedKeyFormatter < ::JsonApiClient::KeyFormatter + class << self + # source://json_api_client//lib/json_api_client/formatter.rb#91 + def format(key); end + + # source://json_api_client//lib/json_api_client/formatter.rb#95 + def unformat(formatted_key); end + end +end + +# source://json_api_client//lib/json_api_client/formatter.rb#133 +class JsonApiClient::DasherizedRouteFormatter < ::JsonApiClient::RouteFormatter + class << self + # source://json_api_client//lib/json_api_client/formatter.rb#135 + def format(route); end + + # source://json_api_client//lib/json_api_client/formatter.rb#139 + def unformat(formatted_route); end + end +end + +# source://json_api_client//lib/json_api_client/formatter.rb#101 +class JsonApiClient::DefaultValueFormatter < ::JsonApiClient::ValueFormatter + class << self + # source://json_api_client//lib/json_api_client/formatter.rb#103 + def format(raw_value); end + end +end + +# source://json_api_client//lib/json_api_client/error_collector.rb#2 +class JsonApiClient::ErrorCollector < ::Array + # @return [ErrorCollector] a new instance of ErrorCollector + # + # source://json_api_client//lib/json_api_client/error_collector.rb#74 + def initialize(error_data); end + + # source://json_api_client//lib/json_api_client/error_collector.rb#84 + def [](source); end + + # source://json_api_client//lib/json_api_client/error_collector.rb#80 + def full_messages; end +end + +# source://json_api_client//lib/json_api_client/error_collector.rb#3 +class JsonApiClient::ErrorCollector::Error + # @return [Error] a new instance of Error + # + # source://json_api_client//lib/json_api_client/error_collector.rb#6 + def initialize(attrs = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/error_collector.rb#4 + def [](*_arg0, **_arg1, &_arg2); end + + # source://json_api_client//lib/json_api_client/error_collector.rb#14 + def about; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#23 + def code; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#31 + def detail; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#43 + def error_key; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#51 + def error_msg; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#10 + def id; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#65 + def meta; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#60 + def source; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#35 + def source_parameter; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#39 + def source_pointer; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#19 + def status; end + + # source://json_api_client//lib/json_api_client/error_collector.rb#27 + def title; end + + protected + + # Returns the value of attribute attrs. + # + # source://json_api_client//lib/json_api_client/error_collector.rb#71 + def attrs; end +end + +# source://json_api_client//lib/json_api_client/errors.rb#4 +module JsonApiClient::Errors; end + +# source://json_api_client//lib/json_api_client/errors.rb#41 +class JsonApiClient::Errors::AccessDenied < ::JsonApiClient::Errors::ClientError; end + +# source://json_api_client//lib/json_api_client/errors.rb#5 +class JsonApiClient::Errors::ApiError < ::StandardError + # @return [ApiError] a new instance of ApiError + # + # source://json_api_client//lib/json_api_client/errors.rb#8 + def initialize(env, msg = T.unsafe(nil)); end + + # Returns the value of attribute env. + # + # source://json_api_client//lib/json_api_client/errors.rb#6 + def env; end + + private + + # Try to fetch json_api errors from response + # + # source://json_api_client//lib/json_api_client/errors.rb#19 + def track_json_api_errors(msg); end +end + +# source://json_api_client//lib/json_api_client/errors.rb#94 +class JsonApiClient::Errors::BadGateway < ::JsonApiClient::Errors::ServerError; end + +# source://json_api_client//lib/json_api_client/errors.rb#32 +class JsonApiClient::Errors::ClientError < ::JsonApiClient::Errors::ApiError; end + +# source://json_api_client//lib/json_api_client/errors.rb#67 +class JsonApiClient::Errors::Conflict < ::JsonApiClient::Errors::ClientError + # @return [Conflict] a new instance of Conflict + # + # source://json_api_client//lib/json_api_client/errors.rb#68 + def initialize(env, msg = T.unsafe(nil)); end +end + +# source://json_api_client//lib/json_api_client/errors.rb#76 +class JsonApiClient::Errors::ConnectionError < ::JsonApiClient::Errors::ApiError; end + +# source://json_api_client//lib/json_api_client/errors.rb#100 +class JsonApiClient::Errors::GatewayTimeout < ::JsonApiClient::Errors::ServerError; end + +# source://json_api_client//lib/json_api_client/errors.rb#91 +class JsonApiClient::Errors::InternalServerError < ::JsonApiClient::Errors::ServerError; end + +# source://json_api_client//lib/json_api_client/errors.rb#44 +class JsonApiClient::Errors::NotAuthorized < ::JsonApiClient::Errors::ClientError; end + +# source://json_api_client//lib/json_api_client/errors.rb#47 +class JsonApiClient::Errors::NotFound < ::JsonApiClient::Errors::ClientError + # @return [NotFound] a new instance of NotFound + # + # source://json_api_client//lib/json_api_client/errors.rb#49 + def initialize(env_or_uri, msg = T.unsafe(nil)); end + + # Returns the value of attribute uri. + # + # source://json_api_client//lib/json_api_client/errors.rb#48 + def uri; end +end + +# source://json_api_client//lib/json_api_client/errors.rb#114 +class JsonApiClient::Errors::RecordNotSaved < ::JsonApiClient::Errors::ServerError + # @return [RecordNotSaved] a new instance of RecordNotSaved + # + # source://json_api_client//lib/json_api_client/errors.rb#117 + def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/errors.rb#120 + def message; end + + # Returns the value of attribute record. + # + # source://json_api_client//lib/json_api_client/errors.rb#115 + def record; end +end + +# source://json_api_client//lib/json_api_client/errors.rb#64 +class JsonApiClient::Errors::RequestTimeout < ::JsonApiClient::Errors::ClientError; end + +# source://json_api_client//lib/json_api_client/errors.rb#35 +class JsonApiClient::Errors::ResourceImmutableError < ::StandardError + # @return [ResourceImmutableError] a new instance of ResourceImmutableError + # + # source://json_api_client//lib/json_api_client/errors.rb#36 + def initialize(msg = T.unsafe(nil)); end +end + +# source://json_api_client//lib/json_api_client/errors.rb#79 +class JsonApiClient::Errors::ServerError < ::JsonApiClient::Errors::ApiError + # @return [ServerError] a new instance of ServerError + # + # source://json_api_client//lib/json_api_client/errors.rb#80 + def initialize(env, msg = T.unsafe(nil)); end +end + +# source://json_api_client//lib/json_api_client/errors.rb#97 +class JsonApiClient::Errors::ServiceUnavailable < ::JsonApiClient::Errors::ServerError; end + +# source://json_api_client//lib/json_api_client/errors.rb#73 +class JsonApiClient::Errors::TooManyRequests < ::JsonApiClient::Errors::ClientError; end + +# source://json_api_client//lib/json_api_client/errors.rb#103 +class JsonApiClient::Errors::UnexpectedStatus < ::JsonApiClient::Errors::ServerError + # @return [UnexpectedStatus] a new instance of UnexpectedStatus + # + # source://json_api_client//lib/json_api_client/errors.rb#105 + def initialize(code, uri); end + + # Returns the value of attribute code. + # + # source://json_api_client//lib/json_api_client/errors.rb#104 + def code; end + + # Returns the value of attribute uri. + # + # source://json_api_client//lib/json_api_client/errors.rb#104 + def uri; end +end + +# source://json_api_client//lib/json_api_client/formatter.rb#6 +class JsonApiClient::Formatter + class << self + # source://json_api_client//lib/json_api_client/formatter.rb#8 + def format(arg); end + + # source://json_api_client//lib/json_api_client/formatter.rb#18 + def formatter_for(format); end + + # source://json_api_client//lib/json_api_client/formatter.rb#12 + def unformat(arg); end + end +end + +# source://json_api_client//lib/json_api_client/helpers.rb#2 +module JsonApiClient::Helpers; end + +# source://json_api_client//lib/json_api_client/helpers/associatable.rb#3 +module JsonApiClient::Helpers::Associatable + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::JsonApiClient::Helpers::Associatable::ClassMethods + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#61 + def _belongs_to_params; end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#69 + def _cached_associations; end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#81 + def _cached_relationship(attr_name); end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#65 + def _clear_belongs_to_params; end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#77 + def _clear_cached_relationship(attr_name); end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#73 + def _clear_cached_relationships; end + + module GeneratedClassMethods + def associations; end + def associations=(value); end + def associations?; end + end + + module GeneratedInstanceMethods; end +end + +# source://json_api_client//lib/json_api_client/helpers/associatable.rb#13 +module JsonApiClient::Helpers::Associatable::ClassMethods + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#14 + def _define_association(attr_name, association_klass, options = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#20 + def _define_relationship_methods(attr_name); end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#37 + def belongs_to(attr_name, options = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#50 + def has_many(attr_name, options = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#55 + def has_one(attr_name, options = T.unsafe(nil)); end +end + +# source://json_api_client//lib/json_api_client/helpers/callbacks.rb#3 +module JsonApiClient::Helpers::Callbacks + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActiveSupport::Callbacks + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveModel::Callbacks + mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods + mixes_in_class_methods ::ActiveSupport::DescendantsTracker + + # source://json_api_client//lib/json_api_client/helpers/callbacks.rb#19 + def destroy; end + + # source://json_api_client//lib/json_api_client/helpers/callbacks.rb#11 + def save; end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + end +end + +# source://json_api_client//lib/json_api_client/helpers/dirty.rb#3 +module JsonApiClient::Helpers::Dirty + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#52 + def attribute_change(attr); end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#48 + def attribute_changed?(attr); end + + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#44 + def attribute_was(attr); end + + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#31 + def attribute_will_change!(attr); end + + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#9 + def changed; end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#5 + def changed?; end + + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#13 + def changed_attributes; end + + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#17 + def clear_changes_information; end + + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#21 + def forget_change!(attr); end + + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#25 + def set_all_attributes_dirty; end + + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#36 + def set_attribute_was(attr, value); end + + protected + + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#58 + def method_missing(method, *args, &block); end + + # source://json_api_client//lib/json_api_client/helpers/dirty.rb#68 + def set_attribute(name, value); end +end + +# source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#3 +module JsonApiClient::Helpers::DynamicAttributes + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#18 + def [](key); end + + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#22 + def []=(key, value); end + + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#5 + def attributes; end + + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#9 + def attributes=(attrs = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#34 + def has_attribute?(attr_name); end + + protected + + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#66 + def key_formatter; end + + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#40 + def method_missing(method, *args, &block); end + + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#54 + def read_attribute(name); end + + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#62 + def safe_key_formatter; end + + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#58 + def set_attribute(name, value); end + + private + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#26 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#70 +class JsonApiClient::Helpers::DynamicAttributes::DefaultKeyFormatter + # source://json_api_client//lib/json_api_client/helpers/dynamic_attributes.rb#71 + def unformat(method); end +end + +# source://json_api_client//lib/json_api_client/helpers/uri.rb#3 +module JsonApiClient::Helpers::URI + # source://json_api_client//lib/json_api_client/helpers/uri.rb#4 + def encode_part(part); end +end + +# source://json_api_client//lib/json_api_client/formatter.rb#109 +class JsonApiClient::IdValueFormatter < ::JsonApiClient::ValueFormatter + class << self + # source://json_api_client//lib/json_api_client/formatter.rb#111 + def format(raw_value); end + end +end + +# source://json_api_client//lib/json_api_client/implementation.rb#2 +class JsonApiClient::Implementation + # @return [Implementation] a new instance of Implementation + # + # source://json_api_client//lib/json_api_client/implementation.rb#5 + def initialize(data); end + + # Returns the value of attribute meta. + # + # source://json_api_client//lib/json_api_client/implementation.rb#3 + def meta; end + + # Returns the value of attribute version. + # + # source://json_api_client//lib/json_api_client/implementation.rb#3 + def version; end +end + +# source://json_api_client//lib/json_api_client/included_data.rb#2 +class JsonApiClient::IncludedData + # @return [IncludedData] a new instance of IncludedData + # + # source://json_api_client//lib/json_api_client/included_data.rb#5 + def initialize(result_set, data); end + + # Returns the value of attribute data. + # + # source://json_api_client//lib/json_api_client/included_data.rb#3 + def data; end + + # source://json_api_client//lib/json_api_client/included_data.rb#33 + def data_for(method_name, definition); end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/included_data.rb#46 + def has_link?(name); end + + private + + # should return a resource record of some type for this linked document + # + # source://json_api_client//lib/json_api_client/included_data.rb#53 + def record_for(link_def); end +end + +# source://json_api_client//lib/json_api_client/formatter.rb#25 +class JsonApiClient::KeyFormatter < ::JsonApiClient::Formatter + class << self + # source://json_api_client//lib/json_api_client/formatter.rb#27 + def format(key); end + + # source://json_api_client//lib/json_api_client/formatter.rb#31 + def format_keys(hash); end + + # source://json_api_client//lib/json_api_client/formatter.rb#39 + def unformat(formatted_key); end + end +end + +# source://json_api_client//lib/json_api_client/linking.rb#2 +module JsonApiClient::Linking; end + +# source://json_api_client//lib/json_api_client/linking/links.rb#3 +class JsonApiClient::Linking::Links + include ::JsonApiClient::Helpers::DynamicAttributes + + # @return [Links] a new instance of Links + # + # source://json_api_client//lib/json_api_client/linking/links.rb#6 + def initialize(links); end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/linking/links.rb#10 + def present?; end + + protected + + # source://json_api_client//lib/json_api_client/linking/links.rb#16 + def set_attribute(name, value); end +end + +# source://json_api_client//lib/json_api_client/linking/top_level_links.rb#3 +class JsonApiClient::Linking::TopLevelLinks + # @return [TopLevelLinks] a new instance of TopLevelLinks + # + # source://json_api_client//lib/json_api_client/linking/top_level_links.rb#7 + def initialize(record_class, links); end + + # source://json_api_client//lib/json_api_client/linking/top_level_links.rb#33 + def fetch_link(link_name); end + + # source://json_api_client//lib/json_api_client/linking/top_level_links.rb#24 + def link_url_for(link_name); end + + # Returns the value of attribute links. + # + # source://json_api_client//lib/json_api_client/linking/top_level_links.rb#5 + def links; end + + # source://json_api_client//lib/json_api_client/linking/top_level_links.rb#16 + def method_missing(method, *args); end + + # Returns the value of attribute record_class. + # + # source://json_api_client//lib/json_api_client/linking/top_level_links.rb#5 + def record_class; end + + private + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/linking/top_level_links.rb#12 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# source://json_api_client//lib/json_api_client/meta_data.rb#2 +class JsonApiClient::MetaData + include ::JsonApiClient::Helpers::DynamicAttributes + + # @return [MetaData] a new instance of MetaData + # + # source://json_api_client//lib/json_api_client/meta_data.rb#7 + def initialize(data, record_class = T.unsafe(nil)); end + + # Returns the value of attribute record_class. + # + # source://json_api_client//lib/json_api_client/meta_data.rb#5 + def record_class; end + + # Sets the attribute record_class + # + # @param value the value to set the attribute record_class to. + # + # source://json_api_client//lib/json_api_client/meta_data.rb#5 + def record_class=(_arg0); end + + protected + + # source://json_api_client//lib/json_api_client/meta_data.rb#14 + def key_formatter; end +end + +# source://json_api_client//lib/json_api_client/middleware.rb#2 +module JsonApiClient::Middleware; end + +# source://json_api_client//lib/json_api_client/middleware/json_request.rb#3 +class JsonApiClient::Middleware::JsonRequest < ::Faraday::Middleware + # source://json_api_client//lib/json_api_client/middleware/json_request.rb#4 + def call(environment); end + + private + + # source://json_api_client//lib/json_api_client/middleware/json_request.rb#14 + def update_accept_header(headers); end +end + +# source://json_api_client//lib/json_api_client/middleware/parse_json.rb#3 +class JsonApiClient::Middleware::ParseJson < ::Faraday::Middleware + # source://json_api_client//lib/json_api_client/middleware/parse_json.rb#5 + def call(environment); end + + private + + # source://json_api_client//lib/json_api_client/middleware/parse_json.rb#16 + def parse(body); end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/middleware/parse_json.rb#26 + def process_response_type?(type); end + + # source://json_api_client//lib/json_api_client/middleware/parse_json.rb#20 + def response_type(env); end +end + +# source://json_api_client//lib/json_api_client/middleware/status.rb#3 +class JsonApiClient::Middleware::Status < ::Faraday::Middleware + # @return [Status] a new instance of Status + # + # source://json_api_client//lib/json_api_client/middleware/status.rb#4 + def initialize(app, options); end + + # source://json_api_client//lib/json_api_client/middleware/status.rb#9 + def call(environment); end + + private + + # source://json_api_client//lib/json_api_client/middleware/status.rb#25 + def custom_handler_for(code); end + + # source://json_api_client//lib/json_api_client/middleware/status.rb#29 + def handle_status(code, env); end +end + +# source://json_api_client//lib/json_api_client/paginating.rb#2 +module JsonApiClient::Paginating; end + +# An alternate, more consistent Paginator that always wraps +# pagination query string params in a top-level wrapper_name, +# e.g. page[offset]=2, page[limit]=10. +# +# source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#6 +class JsonApiClient::Paginating::NestedParamPaginator + # @return [NestedParamPaginator] a new instance of NestedParamPaginator + # + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#57 + def initialize(result_set, data); end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#105 + def current_page; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#71 + def first; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#75 + def last; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#99 + def limit_value; end + + # Returns the value of attribute links. + # + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#55 + def links; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#63 + def next; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#117 + def next_page; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#95 + def offset; end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#109 + def out_of_bounds?; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#121 + def page_param; end + + # Returns the value of attribute params. + # + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#55 + def params; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#99 + def per_page; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#125 + def per_page_param; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#67 + def prev; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#113 + def previous_page; end + + # Returns the value of attribute result_set. + # + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#55 + def result_set; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#93 + def total_count; end + + # this is an estimate, not necessarily an exact count + # + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#90 + def total_entries; end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#79 + def total_pages; end + + protected + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#133 + def params_for_uri(uri); end + + class << self + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#25 + def page_param; end + + # @raise [ArgumentError] + # + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#30 + def page_param=(param = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#36 + def per_page_param; end + + # @raise [ArgumentError] + # + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#41 + def per_page_param=(param = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#15 + def wrapper_name; end + + # @raise [ArgumentError] + # + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#19 + def wrapper_name=(param = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#49 + def valid_param?(param); end + end +end + +# source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#8 +JsonApiClient::Paginating::NestedParamPaginator::DEFAULT_PAGE_PARAM = T.let(T.unsafe(nil), String) + +# source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#9 +JsonApiClient::Paginating::NestedParamPaginator::DEFAULT_PER_PAGE_PARAM = T.let(T.unsafe(nil), String) + +# source://json_api_client//lib/json_api_client/paginating/nested_param_paginator.rb#7 +JsonApiClient::Paginating::NestedParamPaginator::DEFAULT_WRAPPER_NAME = T.let(T.unsafe(nil), String) + +# source://json_api_client//lib/json_api_client/paginating/paginator.rb#3 +class JsonApiClient::Paginating::Paginator + # @return [Paginator] a new instance of Paginator + # + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#12 + def initialize(result_set, data); end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#62 + def current_page; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#26 + def first; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#30 + def last; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#56 + def limit_value; end + + # Returns the value of attribute links. + # + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#10 + def links; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#18 + def next; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#74 + def next_page; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#52 + def offset; end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#66 + def out_of_bounds?; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def page_param; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def page_param=(_arg0); end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def page_param?; end + + # Returns the value of attribute params. + # + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#10 + def params; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#56 + def per_page; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def per_page_param; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def per_page_param=(_arg0); end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def per_page_param?; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#22 + def prev; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#70 + def previous_page; end + + # Returns the value of attribute result_set. + # + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#10 + def result_set; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#50 + def total_count; end + + # this number may be off + # + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#47 + def total_entries; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#34 + def total_pages; end + + protected + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#82 + def params_for_uri(uri); end + + class << self + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def page_param; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def page_param=(value); end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def page_param?; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def per_page_param; end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def per_page_param=(value); end + + # source://json_api_client//lib/json_api_client/paginating/paginator.rb#4 + def per_page_param?; end + end +end + +# source://json_api_client//lib/json_api_client/parsers.rb#2 +module JsonApiClient::Parsers; end + +# source://json_api_client//lib/json_api_client/parsers/parser.rb#3 +class JsonApiClient::Parsers::Parser + class << self + # Given a resource hash, returns a Resource.new friendly hash + # which flattens the attributes in w/ id and type. + # + # Example: + # + # Given: + # { + # id: 1. + # type: 'person', + # attributes: { + # first_name: 'Jeff', + # last_name: 'Ching' + # }, + # links: {...}, + # relationships: {...} + # } + # + # Returns: + # { + # id: 1, + # type: 'person', + # first_name: 'Jeff', + # last_name: 'Ching' + # links: {...}, + # relationships: {...} + # } + # + # source://json_api_client//lib/json_api_client/parsers/parser.rb#51 + def parameters_from_resource(params); end + + # source://json_api_client//lib/json_api_client/parsers/parser.rb#5 + def parse(klass, response); end + + private + + # source://json_api_client//lib/json_api_client/parsers/parser.rb#62 + def handle_data(result_set, data); end + + # source://json_api_client//lib/json_api_client/parsers/parser.rb#76 + def handle_errors(result_set, data); end + + # source://json_api_client//lib/json_api_client/parsers/parser.rb#96 + def handle_included(result_set, data); end + + # source://json_api_client//lib/json_api_client/parsers/parser.rb#58 + def handle_json_api(result_set, data); end + + # source://json_api_client//lib/json_api_client/parsers/parser.rb#84 + def handle_links(result_set, data); end + + # source://json_api_client//lib/json_api_client/parsers/parser.rb#80 + def handle_meta(result_set, data); end + + # source://json_api_client//lib/json_api_client/parsers/parser.rb#92 + def handle_pagination(result_set, data); end + + # source://json_api_client//lib/json_api_client/parsers/parser.rb#88 + def handle_relationships(result_set, data); end + end +end + +# source://json_api_client//lib/json_api_client/query.rb#2 +module JsonApiClient::Query; end + +# source://json_api_client//lib/json_api_client/query/builder.rb#5 +class JsonApiClient::Query::Builder + # @return [Builder] a new instance of Builder + # + # source://json_api_client//lib/json_api_client/query/builder.rb#10 + def initialize(klass, opts = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#119 + def ==(other); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#88 + def all; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#69 + def build(attrs = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#73 + def create(attrs = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#119 + def eql?(other); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#93 + def find(args = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#61 + def first; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#112 + def hash; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#34 + def includes(*tables); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#8 + def key_formatter(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute klass. + # + # source://json_api_client//lib/json_api_client/query/builder.rb#7 + def klass; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#65 + def last; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#108 + def method_missing(method_name, *args, &block); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#30 + def order(*args); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#49 + def page(number); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#42 + def paginate(conditions = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#77 + def params; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#53 + def per(size); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#38 + def select(*fields); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#88 + def to_a; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#22 + def where(conditions = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#57 + def with_params(more_params); end + + protected + + # source://json_api_client//lib/json_api_client/query/builder.rb#128 + def _fetch; end + + private + + # source://json_api_client//lib/json_api_client/query/builder.rb#134 + def _new_scope(opts = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#150 + def additional_params; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#176 + def filter_params; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#172 + def includes_params; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#180 + def order_params; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#162 + def pagination_params; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#222 + def parse_fields(*fields); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#208 + def parse_orders(*args); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#204 + def parse_related_links(*tables); end + + # source://json_api_client//lib/json_api_client/query/builder.rb#146 + def path_params; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#154 + def primary_key_params; end + + # source://json_api_client//lib/json_api_client/query/builder.rb#184 + def select_params; end +end + +# source://json_api_client//lib/json_api_client/query/requestor.rb#3 +class JsonApiClient::Query::Requestor + include ::JsonApiClient::Helpers::URI + extend ::Forwardable + + # @return [Requestor] a new instance of Requestor + # + # source://json_api_client//lib/json_api_client/query/requestor.rb#7 + def initialize(klass); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def connection(*args, **_arg1, &block); end + + # expects a record + # + # source://json_api_client//lib/json_api_client/query/requestor.rb#12 + def create(record); end + + # source://json_api_client//lib/json_api_client/query/requestor.rb#44 + def custom(method_name, options, params); end + + # source://json_api_client//lib/json_api_client/query/requestor.rb#36 + def destroy(record); end + + # source://json_api_client//lib/json_api_client/query/requestor.rb#30 + def get(params = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/query/requestor.rb#40 + def linked(path); end + + # source://json_api_client//lib/json_api_client/query/requestor.rb#21 + def update(record); end + + protected + + # Returns the value of attribute klass. + # + # source://json_api_client//lib/json_api_client/query/requestor.rb#55 + def klass; end + + # source://json_api_client//lib/json_api_client/query/requestor.rb#66 + def request(type, path, params: T.unsafe(nil), body: T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/query/requestor.rb#58 + def resource_path(parameters); end +end + +# source://json_api_client//lib/json_api_client/relationships.rb#2 +module JsonApiClient::Relationships; end + +# source://json_api_client//lib/json_api_client/relationships/relations.rb#3 +class JsonApiClient::Relationships::Relations + include ::JsonApiClient::Helpers::DynamicAttributes + include ::JsonApiClient::Helpers::Dirty + include ::ActiveModel::Serialization + + # @return [Relations] a new instance of Relations + # + # source://json_api_client//lib/json_api_client/relationships/relations.rb#11 + def initialize(record_class, relations); end + + # source://json_api_client//lib/json_api_client/relationships/relations.rb#26 + def as_json; end + + # source://json_api_client//lib/json_api_client/relationships/relations.rb#20 + def as_json_api; end + + # source://json_api_client//lib/json_api_client/relationships/relations.rb#32 + def attributes_for_serialization; end + + # source://json_api_client//lib/json_api_client/relationships/relations.rb#9 + def key_formatter(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/relationships/relations.rb#16 + def present?; end + + # Returns the value of attribute record_class. + # + # source://json_api_client//lib/json_api_client/relationships/relations.rb#8 + def record_class; end + + protected + + # source://json_api_client//lib/json_api_client/relationships/relations.rb#38 + def set_attribute(name, value); end +end + +# source://json_api_client//lib/json_api_client/relationships/top_level_relations.rb#3 +class JsonApiClient::Relationships::TopLevelRelations + # @return [TopLevelRelations] a new instance of TopLevelRelations + # + # source://json_api_client//lib/json_api_client/relationships/top_level_relations.rb#7 + def initialize(record_class, relations); end + + # source://json_api_client//lib/json_api_client/relationships/top_level_relations.rb#24 + def fetch_relation(relation_name); end + + # source://json_api_client//lib/json_api_client/relationships/top_level_relations.rb#16 + def method_missing(method, *args); end + + # Returns the value of attribute record_class. + # + # source://json_api_client//lib/json_api_client/relationships/top_level_relations.rb#5 + def record_class; end + + # Returns the value of attribute relations. + # + # source://json_api_client//lib/json_api_client/relationships/top_level_relations.rb#5 + def relations; end + + private + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/relationships/top_level_relations.rb#12 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# source://json_api_client//lib/json_api_client/request_params.rb#2 +class JsonApiClient::RequestParams + # @return [RequestParams] a new instance of RequestParams + # + # source://json_api_client//lib/json_api_client/request_params.rb#5 + def initialize(klass, includes: T.unsafe(nil), fields: T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/request_params.rb#11 + def add_includes(includes); end + + # source://json_api_client//lib/json_api_client/request_params.rb#34 + def clear; end + + # source://json_api_client//lib/json_api_client/request_params.rb#30 + def field_types; end + + # Returns the value of attribute fields. + # + # source://json_api_client//lib/json_api_client/request_params.rb#3 + def fields; end + + # Returns the value of attribute includes. + # + # source://json_api_client//lib/json_api_client/request_params.rb#3 + def includes; end + + # Returns the value of attribute klass. + # + # source://json_api_client//lib/json_api_client/request_params.rb#3 + def klass; end + + # source://json_api_client//lib/json_api_client/request_params.rb#26 + def remove_fields(type); end + + # source://json_api_client//lib/json_api_client/request_params.rb#18 + def reset_includes!; end + + # source://json_api_client//lib/json_api_client/request_params.rb#22 + def set_fields(type, field_names); end + + # source://json_api_client//lib/json_api_client/request_params.rb#39 + def to_params; end + + private + + # source://json_api_client//lib/json_api_client/request_params.rb#51 + def parsed_fields; end + + # source://json_api_client//lib/json_api_client/request_params.rb#46 + def parsed_includes; end +end + +# source://json_api_client//lib/json_api_client/resource.rb#6 +class JsonApiClient::Resource + include ::ActiveModel::Validations + include ::ActiveSupport::Callbacks + include ::ActiveModel::Validations::HelperMethods + include ::ActiveModel::Conversion + include ::ActiveModel::Serialization + include ::JsonApiClient::Helpers::DynamicAttributes + include ::JsonApiClient::Helpers::Dirty + include ::JsonApiClient::Helpers::Associatable + extend ::ActiveModel::Naming + extend ::ActiveModel::Translation + extend ::ActiveModel::Validations::ClassMethods + extend ::ActiveModel::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + extend ::ActiveModel::Validations::HelperMethods + extend ::ActiveModel::Conversion::ClassMethods + extend ::JsonApiClient::Helpers::Associatable::ClassMethods + + # Instantiate a new resource object + # + # @param params [Hash] Attributes, links, and relationships + # @return [Resource] a new instance of Resource + # + # source://json_api_client//lib/json_api_client/resource.rb#356 + def initialize(params = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#10 + def __belongs_to_params; end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#10 + def __belongs_to_params=(_arg0); end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#9 + def __cached_associations; end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#9 + def __cached_associations=(_arg0); end + + # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://json_api_client//lib/json_api_client/resource.rb#44 + def _immutable; end + + # source://json_api_client//lib/json_api_client/resource.rb#44 + def _immutable?; end + + # source://activesupport/7.0.6/lib/active_support/callbacks.rb#928 + def _run_validate_callbacks(&block); end + + # source://activesupport/7.0.6/lib/active_support/callbacks.rb#940 + def _validate_callbacks; end + + # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + def _validators; end + + # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + def _validators?; end + + # source://json_api_client//lib/json_api_client/resource.rb#41 + def add_defaults_to_changes; end + + # source://json_api_client//lib/json_api_client/resource.rb#41 + def add_defaults_to_changes?; end + + # source://json_api_client//lib/json_api_client/resource.rb#453 + def as_json(*_arg0); end + + # When we represent this resource for serialization (create/update), we do so + # with this implementation + # + # @return [Hash] Representation of this object as JSONAPI object + # + # source://json_api_client//lib/json_api_client/resource.rb#444 + def as_json_api(*_arg0); end + + # When we represent this resource as a relationship, we do so with id & type + # + # @return [Hash] Representation of this object as a relation + # + # source://json_api_client//lib/json_api_client/resource.rb#436 + def as_relation; end + + # Try to destroy this resource + # + # @raise [JsonApiClient::Errors::ResourceImmutableError] + # @return [Boolean] Whether or not the destroy succeeded + # + # source://json_api_client//lib/json_api_client/resource.rb#511 + def destroy; end + + # Whether or not this record has been destroyed to the database previously + # + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/resource.rb#422 + def destroyed?; end + + # source://json_api_client//lib/json_api_client/resource.rb#526 + def inspect; end + + # Returns the value of attribute last_result_set. + # + # source://json_api_client//lib/json_api_client/resource.rb#17 + def last_result_set; end + + # Sets the attribute last_result_set + # + # @param value the value to set the attribute last_result_set to. + # + # source://json_api_client//lib/json_api_client/resource.rb#17 + def last_result_set=(_arg0); end + + # Returns the value of attribute links. + # + # source://json_api_client//lib/json_api_client/resource.rb#17 + def links; end + + # Sets the attribute links + # + # @param value the value to set the attribute links to. + # + # source://json_api_client//lib/json_api_client/resource.rb#17 + def links=(_arg0); end + + # Mark the record as destroyed + # + # source://json_api_client//lib/json_api_client/resource.rb#415 + def mark_as_destroyed!; end + + # Mark the record as persisted + # + # source://json_api_client//lib/json_api_client/resource.rb#403 + def mark_as_persisted!; end + + # source://activemodel/7.0.6/lib/active_model/naming.rb#244 + def model_name(*_arg0, **_arg1, &_arg2); end + + # Returns true if this is a new record (never persisted to the database) + # + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/resource.rb#429 + def new_record?; end + + # source://json_api_client//lib/json_api_client/resource.rb#555 + def path_attributes; end + + # Whether or not this record has been persisted to the database previously + # + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/resource.rb#410 + def persisted?; end + + # Returns the value of attribute relationships. + # + # source://json_api_client//lib/json_api_client/resource.rb#17 + def relationships; end + + # Sets the attribute relationships + # + # @param value the value to set the attribute relationships to. + # + # source://json_api_client//lib/json_api_client/resource.rb#17 + def relationships=(_arg0); end + + # source://json_api_client//lib/json_api_client/resource.rb#530 + def request_includes(*includes); end + + # Returns the value of attribute request_params. + # + # source://json_api_client//lib/json_api_client/resource.rb#17 + def request_params; end + + # Sets the attribute request_params + # + # @param value the value to set the attribute request_params to. + # + # source://json_api_client//lib/json_api_client/resource.rb#17 + def request_params=(_arg0); end + + # source://json_api_client//lib/json_api_client/resource.rb#540 + def request_select(*fields); end + + # source://json_api_client//lib/json_api_client/resource.rb#535 + def reset_request_includes!; end + + # source://json_api_client//lib/json_api_client/resource.rb#549 + def reset_request_select!(*resource_types); end + + # Commit the current changes to the resource to the remote server. + # If the resource was previously loaded from the server, we will + # try to update the record. Otherwise if it's a new record, then + # we will try to create it + # + # @raise [JsonApiClient::Errors::ResourceImmutableError] + # @return [Boolean] Whether or not the save succeeded + # + # source://json_api_client//lib/json_api_client/resource.rb#479 + def save; end + + # Mark all attributes for this record as dirty + # + # source://json_api_client//lib/json_api_client/resource.rb#463 + def set_all_dirty!; end + + # Alias to update_attributes + # + # @param attrs [Hash] Attributes to update + # @return [Boolean] Whether the update succeeded or not + # + # source://json_api_client//lib/json_api_client/resource.rb#394 + def update(attrs = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/resource.rb#398 + def update!(attrs = T.unsafe(nil)); end + + # Set the current attributes and try to save them + # + # @param attrs [Hash] Attributes to update + # @return [Boolean] Whether the update succeeded or not + # + # source://json_api_client//lib/json_api_client/resource.rb#380 + def update_attributes(attrs = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/resource.rb#385 + def update_attributes!(attrs = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/resource.rb#468 + def valid?(context = T.unsafe(nil)); end + + # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + def validation_context; end + + protected + + # source://json_api_client//lib/json_api_client/resource.rb#629 + def association_for(name); end + + # source://json_api_client//lib/json_api_client/resource.rb#639 + def attributes_for_serialization; end + + # source://json_api_client//lib/json_api_client/resource.rb#647 + def error_message_for(error); end + + # source://json_api_client//lib/json_api_client/resource.rb#651 + def fill_errors; end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/resource.rb#621 + def has_attribute?(attr_name); end + + # source://json_api_client//lib/json_api_client/resource.rb#574 + def included_data_for(name, relationship_definition); end + + # source://json_api_client//lib/json_api_client/resource.rb#601 + def method_missing(method, *args); end + + # source://json_api_client//lib/json_api_client/resource.rb#635 + def non_serializing_attributes; end + + # source://json_api_client//lib/json_api_client/resource.rb#625 + def property_for(name); end + + # source://json_api_client//lib/json_api_client/resource.rb#594 + def relation_objects_for(name, relationship_definition); end + + # source://json_api_client//lib/json_api_client/resource.rb#578 + def relationship_data_for(name, relationship_definition); end + + # source://json_api_client//lib/json_api_client/resource.rb#570 + def relationship_definition_for(name); end + + # source://json_api_client//lib/json_api_client/resource.rb#643 + def relationships_for_serialization; end + + # source://json_api_client//lib/json_api_client/resource.rb#615 + def set_attribute(name, value); end + + # source://json_api_client//lib/json_api_client/resource.rb#561 + def setup_default_properties; end + + private + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/resource.rb#609 + def respond_to_missing?(symbol, include_all = T.unsafe(nil)); end + + # source://activemodel/7.0.6/lib/active_model/validations.rb#48 + def validation_context=(_arg0); end + + class << self + # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + def __callbacks; end + + # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + def __callbacks=(value); end + + # source://activesupport/7.0.6/lib/active_support/callbacks.rb#68 + def __callbacks?; end + + # source://json_api_client//lib/json_api_client/resource.rb#44 + def _immutable; end + + # source://json_api_client//lib/json_api_client/resource.rb#44 + def _immutable=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#44 + def _immutable?; end + + # source://activesupport/7.0.6/lib/active_support/callbacks.rb#932 + def _validate_callbacks; end + + # source://activesupport/7.0.6/lib/active_support/callbacks.rb#936 + def _validate_callbacks=(value); end + + # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + def _validators; end + + # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + def _validators=(value); end + + # source://activemodel/7.0.6/lib/active_model/validations.rb#52 + def _validators?; end + + # source://json_api_client//lib/json_api_client/resource.rb#41 + def add_defaults_to_changes; end + + # source://json_api_client//lib/json_api_client/resource.rb#41 + def add_defaults_to_changes=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#41 + def add_defaults_to_changes?; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def all(*args, **_arg1, &block); end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#7 + def associations; end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#7 + def associations=(value); end + + # source://json_api_client//lib/json_api_client/helpers/associatable.rb#7 + def associations?; end + + # Return/build a connection object + # + # @return [Connection] The connection to the json api server + # + # source://json_api_client//lib/json_api_client/resource.rb#137 + def connection(rebuild = T.unsafe(nil), &block); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def connection_class; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def connection_class=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def connection_class?; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def connection_object; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def connection_object=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def connection_object?; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def connection_options; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def connection_options=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def connection_options?; end + + # Create a new instance of this resource class + # + # @param attributes [Hash] The attributes to create this resource with + # @return [Resource] The instance you tried to create. You will have to check the persisted state or errors on this object to see success/failure. + # + # source://json_api_client//lib/json_api_client/resource.rb#169 + def create(attributes = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/resource.rb#175 + def create!(attributes = T.unsafe(nil)); end + + # The current custom headers to send with any request made by this + # resource class + # + # @return [Hash] Headers + # + # source://json_api_client//lib/json_api_client/resource.rb#197 + def custom_headers; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def custom_type_to_class; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def custom_type_to_class=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def custom_type_to_class?; end + + # Default attributes that every instance of this resource should be + # initialized with. Optionally, override this method in a subclass. + # + # @return [Hash] Default attributes + # + # source://json_api_client//lib/json_api_client/resource.rb#214 + def default_attributes; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def find(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def first(*args, **_arg1, &block); end + + # Indicates whether this resource is mutable or immutable; + # by default, all resources are mutable. + # + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/resource.rb#106 + def immutable(flag = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def includes(*args, **_arg1, &block); end + + # @private + # + # source://json_api_client//lib/json_api_client/resource.rb#110 + def inherited(subclass); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def json_key_format; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def json_key_format=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def json_key_format?; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def keep_request_params; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def keep_request_params=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def keep_request_params?; end + + # source://json_api_client//lib/json_api_client/resource.rb#225 + def key_formatter; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def last(*args, **_arg1, &block); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def linker; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def linker=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def linker?; end + + # Load a resource object from attributes and consider it persisted + # + # @return [Resource] Persisted resource object + # + # source://json_api_client//lib/json_api_client/resource.rb#126 + def load(params); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def order(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def page(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def paginate(*args, **_arg1, &block); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def paginator; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def paginator=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def paginator?; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def parser; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def parser=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def parser?; end + + # Return the path or path pattern for this resource + # + # source://json_api_client//lib/json_api_client/resource.rb#151 + def path(params = T.unsafe(nil)); end + + # Param names that will be considered path params. They will be used + # to build the resource path rather than treated as attributes + # + # @return [Array] Param name symbols of parameters that will be treated as path parameters + # + # source://json_api_client//lib/json_api_client/resource.rb#146 + def prefix_params; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def primary_key; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def primary_key=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def primary_key?; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def query_builder; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def query_builder=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def query_builder?; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def raise_on_blank_find_param; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def raise_on_blank_find_param=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def raise_on_blank_find_param?; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def read_only_attributes; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def read_only_attributes=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def read_only_attributes?; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def relationship_linker; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def relationship_linker=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def relationship_linker?; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def request_params_class; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def request_params_class=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def request_params_class?; end + + # Returns the requestor for this resource class + # + # @return [Requestor] The requestor for this resource class + # + # source://json_api_client//lib/json_api_client/resource.rb#206 + def requestor; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def requestor_class; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def requestor_class=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def requestor_class?; end + + # source://json_api_client//lib/json_api_client/resource.rb#75 + def resolve_custom_type(type_name, class_name); end + + # The name of a single resource. i.e. Article -> article, Person -> person + # + # @return [String] + # + # source://json_api_client//lib/json_api_client/resource.rb#90 + def resource_name; end + + # Specifies the relative path that should be used for this resource; + # by default, this is inferred from the resource class name. + # + # @return [String] Resource path + # + # source://json_api_client//lib/json_api_client/resource.rb#119 + def resource_path; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def route_format; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def route_format=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def route_format?; end + + # source://json_api_client//lib/json_api_client/resource.rb#229 + def route_formatter; end + + # Returns the schema for this resource class + # + # @return [Schema] The schema for this resource class + # + # source://json_api_client//lib/json_api_client/resource.rb#221 + def schema; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def search_included_in_result_set; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def search_included_in_result_set=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def search_included_in_result_set?; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def select(*args, **_arg1, &block); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def site; end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def site=(value); end + + # source://json_api_client//lib/json_api_client/resource.rb#21 + def site?; end + + # The table name for this resource. i.e. Article -> articles, Person -> people + # + # @return [String] The table name for this resource + # + # source://json_api_client//lib/json_api_client/resource.rb#83 + def table_name; end + + # Specifies the JSON API resource type. By default this is inferred + # from the resource class name. + # + # @return [String] Resource path + # + # source://json_api_client//lib/json_api_client/resource.rb#98 + def type; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def where(*args, **_arg1, &block); end + + # Within the given block, add these headers to all requests made by + # the resource class + # + # @param headers [Hash] The headers to send along + # @param block [Block] The block where headers will be set for + # + # source://json_api_client//lib/json_api_client/resource.rb#186 + def with_headers(headers); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def with_params(*args, **_arg1, &block); end + + protected + + # source://json_api_client//lib/json_api_client/resource.rb#313 + def _belongs_to_associations; end + + # source://json_api_client//lib/json_api_client/resource.rb#345 + def _build_connection(rebuild = T.unsafe(nil)); end + + # source://json_api_client//lib/json_api_client/resource.rb#337 + def _custom_headers=(headers); end + + # source://json_api_client//lib/json_api_client/resource.rb#341 + def _header_store; end + + # source://json_api_client//lib/json_api_client/resource.rb#333 + def _new_scope; end + + # source://json_api_client//lib/json_api_client/resource.rb#317 + def _prefix_path; end + + # source://json_api_client//lib/json_api_client/resource.rb#325 + def _set_prefix_path(attrs); end + + # Declares a new class method that acts on the collection + # + # @option options + # @param name [Symbol] the name of the endpoint and the method name + # @param options [Hash] endpoint options + # + # source://json_api_client//lib/json_api_client/resource.rb#259 + def collection_endpoint(name, options = T.unsafe(nil)); end + + # Declares a new class/instance method that acts on the collection/member + # + # @option [Symbol] + # @option [Symbol] + # @param name [Symbol] the name of the endpoint + # @param options [Hash] endpoint options + # @param [Symbol] [Hash] a customizable set of options + # + # source://json_api_client//lib/json_api_client/resource.rb#241 + def custom_endpoint(name, options = T.unsafe(nil)); end + + # Declares a new instance method that acts on the member object + # + # @option options + # @param name [Symbol] the name of the endpoint and the method name + # @param options [Hash] endpoint options + # + # source://json_api_client//lib/json_api_client/resource.rb#276 + def member_endpoint(name, options = T.unsafe(nil)); end + + # Declare multiple properties with the same optional options + # + # @option options + # @option options + # @param names [Array] + # @param options [Hash] property options + # + # source://json_api_client//lib/json_api_client/resource.rb#306 + def properties(*names); end + + # Declares a new property by name + # + # @option options + # @option options + # @param name [Symbol] the name of the property + # @param options [Hash] property options + # + # source://json_api_client//lib/json_api_client/resource.rb#290 + def property(name, options = T.unsafe(nil)); end + end +end + +# source://json_api_client//lib/json_api_client/result_set.rb#4 +class JsonApiClient::ResultSet < ::Array + extend ::Forwardable + + # source://forwardable/1.3.3/forwardable.rb#231 + def current_page(*args, **_arg1, &block); end + + # Returns the value of attribute errors. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def errors; end + + # Sets the attribute errors + # + # @param value the value to set the attribute errors to. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def errors=(_arg0); end + + # @return [Boolean] + # + # source://json_api_client//lib/json_api_client/result_set.rb#20 + def has_errors?; end + + # Returns the value of attribute implementation. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def implementation; end + + # Sets the attribute implementation + # + # @param value the value to set the attribute implementation to. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def implementation=(_arg0); end + + # Returns the value of attribute included. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def included; end + + # Sets the attribute included + # + # @param value the value to set the attribute included to. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def included=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def limit_value(*args, **_arg1, &block); end + + # Returns the value of attribute links. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def links; end + + # Sets the attribute links + # + # @param value the value to set the attribute links to. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def links=(_arg0); end + + # Returns the value of attribute meta. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def meta; end + + # Sets the attribute meta + # + # @param value the value to set the attribute meta to. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def meta=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def next_page(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def offset(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def out_of_bounds?(*args, **_arg1, &block); end + + # Returns the value of attribute pages. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def pages; end + + # Sets the attribute pages + # + # @param value the value to set the attribute pages to. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def pages=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def per_page(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def previous_page(*args, **_arg1, &block); end + + # Returns the value of attribute record_class. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def record_class; end + + # Sets the attribute record_class + # + # @param value the value to set the attribute record_class to. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def record_class=(_arg0); end + + # Returns the value of attribute relationships. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def relationships; end + + # Sets the attribute relationships + # + # @param value the value to set the attribute relationships to. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def relationships=(_arg0); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def total_count(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def total_entries(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def total_pages(*args, **_arg1, &block); end + + # Returns the value of attribute uri. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def uri; end + + # Sets the attribute uri + # + # @param value the value to set the attribute uri to. + # + # source://json_api_client//lib/json_api_client/result_set.rb#7 + def uri=(_arg0); end +end + +# source://json_api_client//lib/json_api_client/formatter.rb#45 +class JsonApiClient::RouteFormatter < ::JsonApiClient::Formatter + class << self + # source://json_api_client//lib/json_api_client/formatter.rb#47 + def format(route); end + + # source://json_api_client//lib/json_api_client/formatter.rb#51 + def unformat(formatted_route); end + end +end + +# source://json_api_client//lib/json_api_client/schema.rb#3 +class JsonApiClient::Schema + # @return [Schema] a new instance of Schema + # + # source://json_api_client//lib/json_api_client/schema.rb#108 + def initialize; end + + # Look up a property by name + # + # @param property_name [String] the name of the property + # @return [Property, nil] the property definition for property_name or nil + # + # source://json_api_client//lib/json_api_client/schema.rb#142 + def [](property_name); end + + # Add a property to the schema + # + # @option options + # @option options + # @param name [Symbol] the name of the property + # @param options [Hash] property options + # @return [void] + # + # source://json_api_client//lib/json_api_client/schema.rb#119 + def add(name, options); end + + # source://json_api_client//lib/json_api_client/schema.rb#132 + def each(&block); end + + # source://json_api_client//lib/json_api_client/schema.rb#132 + def each_property(&block); end + + # Look up a property by name + # + # @param property_name [String] the name of the property + # @return [Property, nil] the property definition for property_name or nil + # + # source://json_api_client//lib/json_api_client/schema.rb#142 + def find(property_name); end + + # How many properties are defined + # + # @return [Fixnum] the number of defined properties + # + # source://json_api_client//lib/json_api_client/schema.rb#126 + def length; end + + # How many properties are defined + # + # @return [Fixnum] the number of defined properties + # + # source://json_api_client//lib/json_api_client/schema.rb#126 + def size; end + + class << self + # source://json_api_client//lib/json_api_client/schema.rb#149 + def register(type_hash); end + end +end + +# source://json_api_client//lib/json_api_client/schema.rb#98 +class JsonApiClient::Schema::Property < ::Struct + # source://json_api_client//lib/json_api_client/schema.rb#99 + def cast(value); end + + # Returns the value of attribute default + # + # @return [Object] the current value of default + def default; end + + # Sets the attribute default + # + # @param value [Object] the value to set the attribute default to. + # @return [Object] the newly set value + def default=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + # Returns the value of attribute type + # + # @return [Object] the current value of type + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + def type=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://json_api_client//lib/json_api_client/schema.rb#52 +class JsonApiClient::Schema::TypeFactory + class << self + # Register a new type key or keys with appropriate classes + # + # eg: + # + # require 'money' + # + # class MyMoneyCaster + # def self.cast(value, default) + # begin + # Money.new(value, "USD") + # rescue ArgumentError + # default + # end + # end + # end + # + # JsonApiClient::Schema::TypeFactory.register money: MyMoneyCaster + # + # You can setup several at once: + # + # JsonApiClient::Schema::TypeFactory.register money: MyMoneyCaster, + # date: MyJsonDateTypeCaster + # + # source://json_api_client//lib/json_api_client/schema.rb#80 + def register(type_hash); end + + # source://json_api_client//lib/json_api_client/schema.rb#84 + def type_for(type); end + end +end + +# source://json_api_client//lib/json_api_client/schema.rb#4 +module JsonApiClient::Schema::Types; end + +# source://json_api_client//lib/json_api_client/schema.rb#36 +class JsonApiClient::Schema::Types::Boolean + class << self + # source://json_api_client//lib/json_api_client/schema.rb#37 + def cast(value, default); end + end +end + +# source://json_api_client//lib/json_api_client/schema.rb#30 +class JsonApiClient::Schema::Types::Decimal + class << self + # source://json_api_client//lib/json_api_client/schema.rb#31 + def cast(value, _); end + end +end + +# source://json_api_client//lib/json_api_client/schema.rb#18 +class JsonApiClient::Schema::Types::Float + class << self + # source://json_api_client//lib/json_api_client/schema.rb#19 + def cast(value, _); end + end +end + +# source://json_api_client//lib/json_api_client/schema.rb#6 +class JsonApiClient::Schema::Types::Integer + class << self + # source://json_api_client//lib/json_api_client/schema.rb#7 + def cast(value, _); end + end +end + +# source://json_api_client//lib/json_api_client/schema.rb#12 +class JsonApiClient::Schema::Types::String + class << self + # source://json_api_client//lib/json_api_client/schema.rb#13 + def cast(value, _); end + end +end + +# source://json_api_client//lib/json_api_client/schema.rb#24 +class JsonApiClient::Schema::Types::Time + class << self + # source://json_api_client//lib/json_api_client/schema.rb#25 + def cast(value, _); end + end +end + +# source://json_api_client//lib/json_api_client/formatter.rb#74 +class JsonApiClient::UnderscoredKeyFormatter < ::JsonApiClient::KeyFormatter; end + +# source://json_api_client//lib/json_api_client/formatter.rb#118 +class JsonApiClient::UnderscoredRouteFormatter < ::JsonApiClient::RouteFormatter; end + +# source://json_api_client//lib/json_api_client/utils.rb#2 +module JsonApiClient::Utils + class << self + # @raise [NameError] + # + # source://json_api_client//lib/json_api_client/utils.rb#4 + def compute_type(klass, type_name); end + + # source://json_api_client//lib/json_api_client/utils.rb#28 + def parse_includes(klass, *tables); end + end +end + +# source://json_api_client//lib/json_api_client/version.rb#2 +JsonApiClient::VERSION = T.let(T.unsafe(nil), String) + +# source://json_api_client//lib/json_api_client/formatter.rb#57 +class JsonApiClient::ValueFormatter < ::JsonApiClient::Formatter + class << self + # source://json_api_client//lib/json_api_client/formatter.rb#59 + def format(raw_value); end + + # source://json_api_client//lib/json_api_client/formatter.rb#63 + def unformat(value); end + + # source://json_api_client//lib/json_api_client/formatter.rb#67 + def value_formatter_for(type); end + end +end diff --git a/sorbet/rbi/gems/multipart-post@2.3.0.rbi b/sorbet/rbi/gems/multipart-post@2.3.0.rbi new file mode 100644 index 000000000..6e1e05385 --- /dev/null +++ b/sorbet/rbi/gems/multipart-post@2.3.0.rbi @@ -0,0 +1,233 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `multipart-post` gem. +# Please instead update this file by running `bin/tapioca gem multipart-post`. + +# source://multipart-post//lib/multipart/post/composite_read_io.rb#72 +CompositeIO = Multipart::Post::CompositeReadIO + +# source://multipart-post//lib/multipart/post/version.rb#7 +module Multipart; end + +# source://multipart-post//lib/multipart/post/version.rb#8 +module Multipart::Post; end + +# Concatenate together multiple IO objects into a single, composite IO object +# for purposes of reading as a single stream. +# +# @example +# crio = CompositeReadIO.new(StringIO.new('one'), +# StringIO.new('two'), +# StringIO.new('three')) +# puts crio.read # => "onetwothree" +# +# source://multipart-post//lib/multipart/post/composite_read_io.rb#28 +class Multipart::Post::CompositeReadIO + # Create a new composite-read IO from the arguments, all of which should + # respond to #read in a manner consistent with IO. + # + # @return [CompositeReadIO] a new instance of CompositeReadIO + # + # source://multipart-post//lib/multipart/post/composite_read_io.rb#31 + def initialize(*ios); end + + # Read from IOs in order until `length` bytes have been received. + # + # source://multipart-post//lib/multipart/post/composite_read_io.rb#37 + def read(length = T.unsafe(nil), outbuf = T.unsafe(nil)); end + + # source://multipart-post//lib/multipart/post/composite_read_io.rb#54 + def rewind; end + + private + + # source://multipart-post//lib/multipart/post/composite_read_io.rb#65 + def advance_io; end + + # source://multipart-post//lib/multipart/post/composite_read_io.rb#61 + def current_io; end +end + +# source://multipart-post//lib/multipart/post/multipartable.rb#23 +module Multipart::Post::Multipartable + # source://multipart-post//lib/multipart/post/multipartable.rb#38 + def initialize(path, params, headers = T.unsafe(nil), boundary = T.unsafe(nil)); end + + # Returns the value of attribute boundary. + # + # source://multipart-post//lib/multipart/post/multipartable.rb#61 + def boundary; end + + private + + # source://multipart-post//lib/multipart/post/multipartable.rb#66 + def symbolize_keys(hash); end + + class << self + # source://multipart-post//lib/multipart/post/multipartable.rb#24 + def secure_boundary; end + end +end + +# source://multipart-post//lib/multipart/post/parts.rb#26 +module Multipart::Post::Parts; end + +# Represents the epilogue or closing boundary. +# +# source://multipart-post//lib/multipart/post/parts.rb#138 +class Multipart::Post::Parts::EpiloguePart + include ::Multipart::Post::Parts::Part + + # @return [EpiloguePart] a new instance of EpiloguePart + # + # source://multipart-post//lib/multipart/post/parts.rb#141 + def initialize(boundary); end +end + +# Represents a part to be filled from file IO. +# +# source://multipart-post//lib/multipart/post/parts.rb#83 +class Multipart::Post::Parts::FilePart + include ::Multipart::Post::Parts::Part + + # @param boundary [String] + # @param name [#to_s] + # @param io [IO] + # @param headers [Hash] + # @return [FilePart] a new instance of FilePart + # + # source://multipart-post//lib/multipart/post/parts.rb#92 + def initialize(boundary, name, io, headers = T.unsafe(nil)); end + + # @param boundary [String] + # @param name [#to_s] + # @param filename [String] + # @param type [String] + # @param content_len [Integer] + # @param opts [Hash] + # + # source://multipart-post//lib/multipart/post/parts.rb#107 + def build_head(boundary, name, filename, type, content_len, opts = T.unsafe(nil)); end + + # Returns the value of attribute length. + # + # source://multipart-post//lib/multipart/post/parts.rb#86 + def length; end +end + +# Represents a parametric part to be filled with given value. +# +# source://multipart-post//lib/multipart/post/parts.rb#51 +class Multipart::Post::Parts::ParamPart + include ::Multipart::Post::Parts::Part + + # @param boundary [String] + # @param name [#to_s] + # @param value [String] + # @param headers [Hash] Content-Type and Content-ID are used, if present. + # @return [ParamPart] a new instance of ParamPart + # + # source://multipart-post//lib/multipart/post/parts.rb#58 + def initialize(boundary, name, value, headers = T.unsafe(nil)); end + + # @param boundary [String] + # @param name [#to_s] + # @param value [String] + # @param headers [Hash] Content-Type is used, if present. + # + # source://multipart-post//lib/multipart/post/parts.rb#71 + def build_part(boundary, name, value, headers = T.unsafe(nil)); end + + # source://multipart-post//lib/multipart/post/parts.rb#63 + def length; end +end + +# source://multipart-post//lib/multipart/post/parts.rb#27 +module Multipart::Post::Parts::Part + # source://multipart-post//lib/multipart/post/parts.rb#41 + def length; end + + # source://multipart-post//lib/multipart/post/parts.rb#45 + def to_io; end + + class << self + # @return [Boolean] + # + # source://multipart-post//lib/multipart/post/parts.rb#37 + def file?(value); end + + # source://multipart-post//lib/multipart/post/parts.rb#28 + def new(boundary, name, value, headers = T.unsafe(nil)); end + end +end + +# Convenience methods for dealing with files and IO that are to be uploaded. +# +# source://multipart-post//lib/multipart/post/upload_io.rb#9 +class Multipart::Post::UploadIO + # Create an upload IO suitable for including in the params hash of a + # Net::HTTP::Post::Multipart. + # + # Can take two forms. The first accepts a filename and content type, and + # opens the file for reading (to be closed by finalizer). + # + # The second accepts an already-open IO, but also requires a third argument, + # the filename from which it was opened (particularly useful/recommended if + # uploading directly from a form in a framework, which often save the file to + # an arbitrarily named RackMultipart file in /tmp). + # + # @example + # UploadIO.new("file.txt", "text/plain") + # UploadIO.new(file_io, "text/plain", "file.txt") + # @return [UploadIO] a new instance of UploadIO + # + # source://multipart-post//lib/multipart/post/upload_io.rb#26 + def initialize(filename_or_io, content_type, filename = T.unsafe(nil), opts = T.unsafe(nil)); end + + # Returns the value of attribute content_type. + # + # source://multipart-post//lib/multipart/post/upload_io.rb#10 + def content_type; end + + # Returns the value of attribute io. + # + # source://multipart-post//lib/multipart/post/upload_io.rb#10 + def io; end + + # Returns the value of attribute local_path. + # + # source://multipart-post//lib/multipart/post/upload_io.rb#10 + def local_path; end + + # source://multipart-post//lib/multipart/post/upload_io.rb#52 + def method_missing(*args); end + + # Returns the value of attribute opts. + # + # source://multipart-post//lib/multipart/post/upload_io.rb#10 + def opts; end + + # Returns the value of attribute original_filename. + # + # source://multipart-post//lib/multipart/post/upload_io.rb#10 + def original_filename; end + + # @return [Boolean] + # + # source://multipart-post//lib/multipart/post/upload_io.rb#56 + def respond_to?(meth, include_all = T.unsafe(nil)); end + + class << self + # @raise [ArgumentError] + # + # source://multipart-post//lib/multipart/post/upload_io.rb#46 + def convert!(io, content_type, original_filename, local_path); end + end +end + +# source://multipart-post//lib/multipart/post/version.rb#9 +Multipart::Post::VERSION = T.let(T.unsafe(nil), String) + +# source://multipart-post//lib/multipart/post/upload_io.rb#63 +UploadIO = Multipart::Post::UploadIO diff --git a/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi b/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi new file mode 100644 index 000000000..46bfe6ee6 --- /dev/null +++ b/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby2_keywords` gem. +# Please instead update this file by running `bin/tapioca gem ruby2_keywords`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/spec/tapioca/dsl/compilers/json_api_client_resource_spec.rb b/spec/tapioca/dsl/compilers/json_api_client_resource_spec.rb new file mode 100644 index 000000000..090d0e0fd --- /dev/null +++ b/spec/tapioca/dsl/compilers/json_api_client_resource_spec.rb @@ -0,0 +1,372 @@ +# typed: strict +# frozen_string_literal: true + +require "spec_helper" + +module Tapioca + module Dsl + module Compilers + class JsonApiClientResourceSpec < ::DslSpec + describe "Tapioca::Dsl::Compilers::JsonApiClientResource" do + describe "#initialize" do + it "gathers no constants if there are no Resource classes" do + assert_empty(gathered_constants) + end + + it "gathers only Resource classes" do + add_ruby_file("content.rb", <<~RUBY) + class Post < ::JsonApiClient::Resource + end + + User = Class.new(::JsonApiClient::Resource) + + class Comment + end + RUBY + + assert_equal(["Post", "User"], gathered_constants) + end + + it "ignores Resource classes without a name" do + add_ruby_file("content.rb", <<~RUBY) + post = Class.new(::JsonApiClient::Resource) + RUBY + + assert_empty(gathered_constants) + end + end + + describe "#decorate" do + it "generates empty RBI file if there are no properties" do + add_ruby_file("post.rb", <<~RUBY) + class Post < ::JsonApiClient::Resource + end + RUBY + + expected = <<~RBI + # typed: strong + RBI + + assert_equal(expected, rbi_for(:Post)) + end + + it "generates RBI file for example resource class" do + add_ruby_file("post.rb", <<~RUBY) + class User < JsonApiClient::Resource + has_many :posts + + property :name, type: :string + property :is_admin, type: :boolean, default: false + end + + class Post < JsonApiClient::Resource + belongs_to :user + + property :title, type: :string + end + RUBY + + assert_equal(<<~RBI, rbi_for(:User)) + # typed: strong + + class User + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T::Boolean) } + def is_admin; end + + sig { params(is_admin: T::Boolean).returns(T::Boolean) } + def is_admin=(is_admin); end + + sig { returns(T.nilable(::String)) } + def name; end + + sig { params(name: T.nilable(::String)).returns(T.nilable(::String)) } + def name=(name); end + + sig { returns(T.nilable(T::Array[Post])) } + def posts; end + + sig { params(posts: T.nilable(T::Array[Post])).returns(T.nilable(T::Array[Post])) } + def posts=(posts); end + end + end + RBI + + assert_equal(<<~RBI, rbi_for(:Post)) + # typed: strong + + class Post + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T.nilable(::String)) } + def title; end + + sig { params(title: T.nilable(::String)).returns(T.nilable(::String)) } + def title=(title); end + + sig { returns(T.nilable(::String)) } + def user_id; end + + sig { params(user_id: T.nilable(::String)).returns(T.nilable(::String)) } + def user_id=(user_id); end + end + end + RBI + end + + it "generates properties that have been overridden" do + add_ruby_file("post.rb", <<~RUBY) + class Post < JsonApiClient::Resource + property :name, type: :string + property :title, type: :string + + protected :name + + def name + "name" + end + + def title + "title" + end + + def title= + end + end + RUBY + + expected = <<~RBI + # typed: strong + + class Post + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T.nilable(::String)) } + def name; end + + sig { params(name: T.nilable(::String)).returns(T.nilable(::String)) } + def name=(name); end + + sig { returns(T.nilable(::String)) } + def title; end + + sig { params(title: T.nilable(::String)).returns(T.nilable(::String)) } + def title=(title); end + end + end + RBI + + assert_equal(expected, rbi_for(:Post)) + end + + it "does not generate a method for a broken association" do + add_ruby_file("post.rb", <<~RUBY) + class Post < JsonApiClient::Resource + belongs_to :user + end + RUBY + + # We let the generation raise, the user should not define an association without a corresponding class. + # The association will be unusable anyway. + + assert_raises(NameError, /uninitialized constant Post::User/) do + rbi_for(:Post) + end + end + + it "generates associations" do + add_ruby_file("content.rb", <<~RUBY) + class Image < JsonApiClient::Resource + belongs_to :user + end + + class User < JsonApiClient::Resource + has_many :posts + has_one :image + end + + class Post < JsonApiClient::Resource + belongs_to :user + end + RUBY + + assert_equal(<<~RBI, rbi_for(:Image)) + # typed: strong + + class Image + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T.nilable(::String)) } + def user_id; end + + sig { params(user_id: T.nilable(::String)).returns(T.nilable(::String)) } + def user_id=(user_id); end + end + end + RBI + + assert_equal(<<~RBI, rbi_for(:User)) + # typed: strong + + class User + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T.nilable(Image)) } + def image; end + + sig { params(image: T.nilable(Image)).returns(T.nilable(Image)) } + def image=(image); end + + sig { returns(T.nilable(T::Array[Post])) } + def posts; end + + sig { params(posts: T.nilable(T::Array[Post])).returns(T.nilable(T::Array[Post])) } + def posts=(posts); end + end + end + RBI + + assert_equal(<<~RBI, rbi_for(:Post)) + # typed: strong + + class Post + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T.nilable(::String)) } + def user_id; end + + sig { params(user_id: T.nilable(::String)).returns(T.nilable(::String)) } + def user_id=(user_id); end + end + end + RBI + end + + it "generates untyped properties" do + add_ruby_file("post.rb", <<~RUBY) + class Post < JsonApiClient::Resource + property :name + property :title, type: :foo + end + RUBY + + expected = <<~RBI + # typed: strong + + class Post + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T.untyped) } + def name; end + + sig { params(name: T.untyped).returns(T.untyped) } + def name=(name); end + + sig { returns(T.untyped) } + def title; end + + sig { params(title: T.untyped).returns(T.untyped) } + def title=(title); end + end + end + RBI + + assert_equal(expected, rbi_for(:Post)) + end + + describe "with custom type" do + before do + add_ruby_file("custom_type.rb", <<~RB) + class CustomType + class << self + def cast(value, default) + value + end + end + end + + ::JsonApiClient::Schema::TypeFactory.register({ + custom_type: CustomType, + }) + RB + end + + it "generates untyped properties for custom types" do + add_ruby_file("post.rb", <<~RUBY) + class Post < JsonApiClient::Resource + property :name, type: :custom_type + end + RUBY + + expected = <<~RBI + # typed: strong + + class Post + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T.untyped) } + def name; end + + sig { params(name: T.untyped).returns(T.untyped) } + def name=(name); end + end + end + RBI + + assert_equal(expected, rbi_for(:Post)) + end + + it "honours types that declare sorbet_type" do + add_ruby_file("post.rb", <<~RUBY) + class CustomType + def self.sorbet_type + "Integer" + end + end + + class Post < JsonApiClient::Resource + property :comment_count, type: :custom_type + property :tag_count, type: :custom_type, default: 0 + end + RUBY + + expected = <<~RBI + # typed: strong + + class Post + include JsonApiClientResourceGeneratedMethods + + module JsonApiClientResourceGeneratedMethods + sig { returns(T.nilable(Integer)) } + def comment_count; end + + sig { params(comment_count: T.nilable(Integer)).returns(T.nilable(Integer)) } + def comment_count=(comment_count); end + + sig { returns(Integer) } + def tag_count; end + + sig { params(tag_count: Integer).returns(Integer) } + def tag_count=(tag_count); end + end + end + RBI + + assert_equal(expected, rbi_for(:Post)) + end + end + end + end + end + end + end +end