diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3188cedb..315f7d30 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.25" + ".": "0.1.0-alpha.26" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 3fe8a845..79b6214f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-73c284d36c1ed2d9963fc733e421005fad76e559de8efe9baa6511a43dd72668.yml -openapi_spec_hash: 1e58c4445919b71c77e5c7f16bd6fa7d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e8b684dbd61d1724b5e516a573a952bb6906d63840e27ebda7731a2f71061aff.yml +openapi_spec_hash: 8baff9577d4e721d0494ff315da267ca config_hash: 5146b12344dae76238940989dac1e8a0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cc7f23a..bf2bf66d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 0.1.0-alpha.26 (2025-08-14) + +Full Changelog: [v0.1.0-alpha.25...v0.1.0-alpha.26](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.25...v0.1.0-alpha.26) + +### Features + +* **api:** api update ([80b711b](https://github.com/Finch-API/finch-api-ruby/commit/80b711bc0c917ce1f1f4daaac3301b5c8e5bd1e7)) +* **api:** api update ([5b2d8f2](https://github.com/Finch-API/finch-api-ruby/commit/5b2d8f2d1c30039ca4d4c5acfa055b5c60acefb9)) + + +### Bug Fixes + +* **client:** prioritise bearer auth ([d8817a5](https://github.com/Finch-API/finch-api-ruby/commit/d8817a5e6c6f289dc1dd1a5a5ad35c43049d1f0e)) + + +### Chores + +* collect metadata from type DSL ([e919ec0](https://github.com/Finch-API/finch-api-ruby/commit/e919ec0b110aa3a5ba703bf9dd317b2ea4091a28)) +* **internal:** update comment in script ([5969020](https://github.com/Finch-API/finch-api-ruby/commit/59690202144cf2295b6edc7542f10cd6932b0da2)) +* update @stainless-api/prism-cli to v5.15.0 ([2953337](https://github.com/Finch-API/finch-api-ruby/commit/29533376815ef4be96be5fde8de45fcf3f48a232)) + ## 0.1.0-alpha.25 (2025-07-31) Full Changelog: [v0.1.0-alpha.24...v0.1.0-alpha.25](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.24...v0.1.0-alpha.25) diff --git a/Gemfile.lock b/Gemfile.lock index 2a7f21ba..1bc75d40 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.23) + finch-api (0.1.0.pre.alpha.26) connection_pool GEM diff --git a/README.md b/README.md index 60c3ad6b..e6568bfc 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "finch-api", "~> 0.1.0.pre.alpha.25" +gem "finch-api", "~> 0.1.0.pre.alpha.26" ``` diff --git a/lib/finch_api/client.rb b/lib/finch_api/client.rb index 16173744..f3330ed8 100644 --- a/lib/finch_api/client.rb +++ b/lib/finch_api/client.rb @@ -58,7 +58,9 @@ class Client < FinchAPI::Internal::Transport::BaseClient # # @return [Hash{String=>String}] private def auth_headers - {**bearer_auth, **basic_auth} + return bearer_auth unless bearer_auth.empty? + return basic_auth unless basic_auth.empty? + {} end # @api private diff --git a/lib/finch_api/internal/type/array_of.rb b/lib/finch_api/internal/type/array_of.rb index 9fdffed7..2a7106c0 100644 --- a/lib/finch_api/internal/type/array_of.rb +++ b/lib/finch_api/internal/type/array_of.rb @@ -148,6 +148,7 @@ def to_sorbet_type # @option spec [Boolean] :"nil?" def initialize(type_info, spec = {}) @item_type_fn = FinchAPI::Internal::Type::Converter.type_info(type_info || spec) + @meta = FinchAPI::Internal::Type::Converter.meta_info(type_info, spec) @nilable = spec.fetch(:nil?, false) end diff --git a/lib/finch_api/internal/type/base_model.rb b/lib/finch_api/internal/type/base_model.rb index 75e26847..e7530b48 100644 --- a/lib/finch_api/internal/type/base_model.rb +++ b/lib/finch_api/internal/type/base_model.rb @@ -52,6 +52,7 @@ def fields # # @option spec [Boolean] :"nil?" private def add_field(name_sym, required:, type_info:, spec:) + meta = FinchAPI::Internal::Type::Converter.meta_info(type_info, spec) type_fn, info = case type_info in Proc | FinchAPI::Internal::Type::Converter | Class @@ -81,7 +82,8 @@ def fields required: required, nilable: nilable, const: const, - type_fn: type_fn + type_fn: type_fn, + meta: meta } define_method(setter) do |value| diff --git a/lib/finch_api/internal/type/converter.rb b/lib/finch_api/internal/type/converter.rb index 92b65936..5014231c 100644 --- a/lib/finch_api/internal/type/converter.rb +++ b/lib/finch_api/internal/type/converter.rb @@ -98,6 +98,33 @@ def type_info(spec) end end + # @api private + # + # @param type_info [Hash{Symbol=>Object}, Proc, FinchAPI::Internal::Type::Converter, Class] . + # + # @option type_info [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const + # + # @option type_info [Proc] :enum + # + # @option type_info [Proc] :union + # + # @option type_info [Boolean] :"nil?" + # + # @param spec [Hash{Symbol=>Object}, Proc, FinchAPI::Internal::Type::Converter, Class] . + # + # @option spec [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const + # + # @option spec [Proc] :enum + # + # @option spec [Proc] :union + # + # @option spec [Boolean] :"nil?" + # + # @return [Hash{Symbol=>Object}] + def meta_info(type_info, spec) + [spec, type_info].grep(Hash).first.to_h.except(:const, :enum, :union, :nil?) + end + # @api private # # @param translate_names [Boolean] diff --git a/lib/finch_api/internal/type/hash_of.rb b/lib/finch_api/internal/type/hash_of.rb index f4750e0d..864014be 100644 --- a/lib/finch_api/internal/type/hash_of.rb +++ b/lib/finch_api/internal/type/hash_of.rb @@ -168,6 +168,7 @@ def to_sorbet_type # @option spec [Boolean] :"nil?" def initialize(type_info, spec = {}) @item_type_fn = FinchAPI::Internal::Type::Converter.type_info(type_info || spec) + @meta = FinchAPI::Internal::Type::Converter.meta_info(type_info, spec) @nilable = spec.fetch(:nil?, false) end diff --git a/lib/finch_api/internal/type/union.rb b/lib/finch_api/internal/type/union.rb index d3076a27..b4374478 100644 --- a/lib/finch_api/internal/type/union.rb +++ b/lib/finch_api/internal/type/union.rb @@ -33,20 +33,20 @@ module Union # # All of the specified variant info for this union. # - # @return [Array] + # @return [ArrayObject})>] private def known_variants = (@known_variants ||= []) # @api private # - # @return [Array] + # @return [ArrayObject})>] protected def derefed_variants - known_variants.map { |key, variant_fn| [key, variant_fn.call] } + known_variants.map { |key, variant_fn, meta| [key, variant_fn.call, meta] } end # All of the specified variants for this union. # # @return [Array] - def variants = derefed_variants.map(&:last) + def variants = derefed_variants.map { _2 } # @api private # @@ -72,12 +72,13 @@ def variants = derefed_variants.map(&:last) # # @option spec [Boolean] :"nil?" private def variant(key, spec = nil) + meta = FinchAPI::Internal::Type::Converter.meta_info(nil, spec) variant_info = case key in Symbol - [key, FinchAPI::Internal::Type::Converter.type_info(spec)] + [key, FinchAPI::Internal::Type::Converter.type_info(spec), meta] in Proc | FinchAPI::Internal::Type::Converter | Class | Hash - [nil, FinchAPI::Internal::Type::Converter.type_info(key)] + [nil, FinchAPI::Internal::Type::Converter.type_info(key), meta] end known_variants << variant_info @@ -100,7 +101,8 @@ def variants = derefed_variants.map(&:last) return nil if key == FinchAPI::Internal::OMIT key = key.to_sym if key.is_a?(String) - known_variants.find { |k,| k == key }&.last&.call + _, found = known_variants.find { |k,| k == key } + found&.call else nil end diff --git a/lib/finch_api/models/disconnect_response.rb b/lib/finch_api/models/disconnect_response.rb index 645b548d..9b6db37c 100644 --- a/lib/finch_api/models/disconnect_response.rb +++ b/lib/finch_api/models/disconnect_response.rb @@ -5,13 +5,13 @@ module Models # @see FinchAPI::Resources::Account#disconnect class DisconnectResponse < FinchAPI::Internal::Type::BaseModel # @!attribute status - # If the request is successful, Finch will return “success” (HTTP 200 status). + # If the request is successful, Finch will return "success" (HTTP 200 status). # # @return [String] required :status, String # @!method initialize(status:) - # @param status [String] If the request is successful, Finch will return “success” (HTTP 200 status). + # @param status [String] If the request is successful, Finch will return "success" (HTTP 200 status). end end end diff --git a/lib/finch_api/models/jobs/automated_async_job.rb b/lib/finch_api/models/jobs/automated_async_job.rb index 561cb133..8568a412 100644 --- a/lib/finch_api/models/jobs/automated_async_job.rb +++ b/lib/finch_api/models/jobs/automated_async_job.rb @@ -40,7 +40,7 @@ class AutomatedAsyncJob < FinchAPI::Internal::Type::BaseModel # @!attribute scheduled_at # The datetime a job is scheduled to be run. For scheduled jobs, this datetime can # be in the future if the job has not yet been enqueued. For ad-hoc jobs, this - # field will be null. + # field will be null. # # @return [Time, nil] required :scheduled_at, Time, nil?: true diff --git a/lib/finch_api/models/jobs/automated_list_params.rb b/lib/finch_api/models/jobs/automated_list_params.rb index 5d7fd632..12461cd6 100644 --- a/lib/finch_api/models/jobs/automated_list_params.rb +++ b/lib/finch_api/models/jobs/automated_list_params.rb @@ -8,6 +8,14 @@ class AutomatedListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + # @!attribute entity_id + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + # + # @return [String, nil] + optional :entity_id, String + # @!attribute limit # Number of items to return # @@ -20,7 +28,12 @@ class AutomatedListParams < FinchAPI::Internal::Type::BaseModel # @return [Integer, nil] optional :offset, Integer - # @!method initialize(limit: nil, offset: nil, request_options: {}) + # @!method initialize(entity_id: nil, limit: nil, offset: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Jobs::AutomatedListParams} for more details. + # + # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh + # # @param limit [Integer] Number of items to return # # @param offset [Integer] Index to start from (defaults to 0) diff --git a/lib/finch_api/models/jobs/automated_retrieve_params.rb b/lib/finch_api/models/jobs/automated_retrieve_params.rb index dc698f82..7eb3a0ae 100644 --- a/lib/finch_api/models/jobs/automated_retrieve_params.rb +++ b/lib/finch_api/models/jobs/automated_retrieve_params.rb @@ -8,7 +8,20 @@ class AutomatedRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_id + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + # + # @return [String, nil] + optional :entity_id, String + + # @!method initialize(entity_id: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Jobs::AutomatedRetrieveParams} for more details. + # + # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/jobs/manual_async_job.rb b/lib/finch_api/models/jobs/manual_async_job.rb index 3de53151..33fc62bf 100644 --- a/lib/finch_api/models/jobs/manual_async_job.rb +++ b/lib/finch_api/models/jobs/manual_async_job.rb @@ -8,8 +8,10 @@ class ManualAsyncJob < FinchAPI::Internal::Type::BaseModel # @!attribute body # Specific information about the job, such as individual statuses for batch jobs. # - # @return [Array, nil] - required :body, FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown], nil?: true + # @return [Array, nil] + required :body, + FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown, nil?: true], + nil?: true # @!attribute job_id # @@ -22,7 +24,7 @@ class ManualAsyncJob < FinchAPI::Internal::Type::BaseModel required :status, enum: -> { FinchAPI::Jobs::ManualAsyncJob::Status } # @!method initialize(body:, job_id:, status:) - # @param body [Array, nil] Specific information about the job, such as individual statuses for batch jobs. + # @param body [Array, nil] Specific information about the job, such as individual statuses for batch jobs. # # @param job_id [String] # diff --git a/lib/finch_api/models/jobs/manual_retrieve_params.rb b/lib/finch_api/models/jobs/manual_retrieve_params.rb index 321c5aa6..2ffa97b8 100644 --- a/lib/finch_api/models/jobs/manual_retrieve_params.rb +++ b/lib/finch_api/models/jobs/manual_retrieve_params.rb @@ -8,7 +8,20 @@ class ManualRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute entity_id + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + # + # @return [String, nil] + optional :entity_id, String + + # @!method initialize(entity_id: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Jobs::ManualRetrieveParams} for more details. + # + # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/finch_api/models/request_forwarding_forward_response.rb b/lib/finch_api/models/request_forwarding_forward_response.rb index 28e349ac..27fc4def 100644 --- a/lib/finch_api/models/request_forwarding_forward_response.rb +++ b/lib/finch_api/models/request_forwarding_forward_response.rb @@ -5,16 +5,16 @@ module Models # @see FinchAPI::Resources::RequestForwarding#forward class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel # @!attribute data - # A string representation of the HTTP response body of the forwarded request’s - # response received from the underlying integration’s API. This field may be null - # in the case where the upstream system’s response is empty. + # A string representation of the HTTP response body of the forwarded request's + # response received from the underlying integration's API. This field may be null + # in the case where the upstream system's response is empty. # # @return [String, nil] required :data, String, nil?: true # @!attribute headers - # The HTTP headers of the forwarded request’s response, exactly as received from - # the underlying integration’s API. + # The HTTP headers of the forwarded request's response, exactly as received from + # the underlying integration's API. # # @return [Object, nil] required :headers, FinchAPI::Internal::Type::Unknown, nil?: true @@ -27,8 +27,8 @@ class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel required :request, -> { FinchAPI::Models::RequestForwardingForwardResponse::Request } # @!attribute status_code - # The HTTP status code of the forwarded request’s response, exactly received from - # the underlying integration’s API. This value will be returned as an integer. + # The HTTP status code of the forwarded request's response, exactly received from + # the underlying integration's API. This value will be returned as an integer. # # @return [Integer] required :status_code, Integer, api_name: :statusCode @@ -37,13 +37,13 @@ class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {FinchAPI::Models::RequestForwardingForwardResponse} for more details. # - # @param data [String, nil] A string representation of the HTTP response body of the forwarded request’s res + # @param data [String, nil] A string representation of the HTTP response body of the forwarded request's res # - # @param headers [Object, nil] The HTTP headers of the forwarded request’s response, exactly as received from t + # @param headers [Object, nil] The HTTP headers of the forwarded request's response, exactly as received from t # # @param request [FinchAPI::Models::RequestForwardingForwardResponse::Request] An object containing details of your original forwarded request, for your ease o # - # @param status_code [Integer] The HTTP status code of the forwarded request’s response, exactly received from + # @param status_code [Integer] The HTTP status code of the forwarded request's response, exactly received from # @see FinchAPI::Models::RequestForwardingForwardResponse#request class Request < FinchAPI::Internal::Type::BaseModel diff --git a/lib/finch_api/resources/jobs/automated.rb b/lib/finch_api/resources/jobs/automated.rb index 08853dd8..095ac9de 100644 --- a/lib/finch_api/resources/jobs/automated.rb +++ b/lib/finch_api/resources/jobs/automated.rb @@ -41,30 +41,43 @@ def create(params) ) end + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Jobs::AutomatedRetrieveParams} for more details. + # # Get an automated job by `job_id`. # - # @overload retrieve(job_id, request_options: {}) + # @overload retrieve(job_id, entity_id: nil, request_options: {}) # # @param job_id [String] + # + # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Jobs::AutomatedAsyncJob] # # @see FinchAPI::Models::Jobs::AutomatedRetrieveParams def retrieve(job_id, params = {}) + parsed, options = FinchAPI::Jobs::AutomatedRetrieveParams.dump_request(params) @client.request( method: :get, path: ["jobs/automated/%1$s", job_id], + query: parsed, model: FinchAPI::Jobs::AutomatedAsyncJob, - options: params[:request_options] + options: options ) end + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Jobs::AutomatedListParams} for more details. + # # Get all automated jobs. Automated jobs are completed by a machine. By default, # jobs are sorted in descending order by submission time. For scheduled jobs such # as data syncs, only the next scheduled job is shown. # - # @overload list(limit: nil, offset: nil, request_options: {}) + # @overload list(entity_id: nil, limit: nil, offset: nil, request_options: {}) + # + # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh # # @param limit [Integer] Number of items to return # diff --git a/lib/finch_api/resources/jobs/manual.rb b/lib/finch_api/resources/jobs/manual.rb index 0e04509a..f67f67e9 100644 --- a/lib/finch_api/resources/jobs/manual.rb +++ b/lib/finch_api/resources/jobs/manual.rb @@ -4,23 +4,31 @@ module FinchAPI module Resources class Jobs class Manual + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::Jobs::ManualRetrieveParams} for more details. + # # Get a manual job by `job_id`. Manual jobs are completed by a human and include # Assisted Benefits jobs. # - # @overload retrieve(job_id, request_options: {}) + # @overload retrieve(job_id, entity_id: nil, request_options: {}) # # @param job_id [String] + # + # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [FinchAPI::Models::Jobs::ManualAsyncJob] # # @see FinchAPI::Models::Jobs::ManualRetrieveParams def retrieve(job_id, params = {}) + parsed, options = FinchAPI::Jobs::ManualRetrieveParams.dump_request(params) @client.request( method: :get, path: ["jobs/manual/%1$s", job_id], + query: parsed, model: FinchAPI::Jobs::ManualAsyncJob, - options: params[:request_options] + options: options ) end diff --git a/lib/finch_api/resources/request_forwarding.rb b/lib/finch_api/resources/request_forwarding.rb index 9daf553b..dec63bac 100644 --- a/lib/finch_api/resources/request_forwarding.rb +++ b/lib/finch_api/resources/request_forwarding.rb @@ -7,8 +7,8 @@ class RequestForwarding # {FinchAPI::Models::RequestForwardingForwardParams} for more details. # # The Forward API allows you to make direct requests to an employment system. If - # Finch’s unified API doesn’t have a data model that cleanly fits your needs, then - # Forward allows you to push or pull data models directly against an integration’s + # Finch's unified API doesn't have a data model that cleanly fits your needs, then + # Forward allows you to push or pull data models directly against an integration's # API. # # @overload forward(method_:, route:, data: nil, headers: nil, params: nil, request_options: {}) diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index 8137c136..759d45df 100644 --- a/lib/finch_api/version.rb +++ b/lib/finch_api/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module FinchAPI - VERSION = "0.1.0.pre.alpha.25" + VERSION = "0.1.0.pre.alpha.26" end diff --git a/rbi/finch_api/internal/type/converter.rbi b/rbi/finch_api/internal/type/converter.rbi index b8c0e857..fcbd0417 100644 --- a/rbi/finch_api/internal/type/converter.rbi +++ b/rbi/finch_api/internal/type/converter.rbi @@ -90,6 +90,60 @@ module FinchAPI def self.type_info(spec) end + # @api private + sig do + params( + type_info: + T.any( + { + const: + T.nilable( + T.any(NilClass, T::Boolean, Integer, Float, Symbol) + ), + enum: + T.nilable( + T.proc.returns( + FinchAPI::Internal::Type::Converter::Input + ) + ), + union: + T.nilable( + T.proc.returns( + FinchAPI::Internal::Type::Converter::Input + ) + ) + }, + T.proc.returns(FinchAPI::Internal::Type::Converter::Input), + FinchAPI::Internal::Type::Converter::Input + ), + spec: + T.any( + { + const: + T.nilable( + T.any(NilClass, T::Boolean, Integer, Float, Symbol) + ), + enum: + T.nilable( + T.proc.returns( + FinchAPI::Internal::Type::Converter::Input + ) + ), + union: + T.nilable( + T.proc.returns( + FinchAPI::Internal::Type::Converter::Input + ) + ) + }, + T.proc.returns(FinchAPI::Internal::Type::Converter::Input), + FinchAPI::Internal::Type::Converter::Input + ) + ).returns(FinchAPI::Internal::AnyHash) + end + def self.meta_info(type_info, spec) + end + # @api private sig do params(translate_names: T::Boolean).returns( diff --git a/rbi/finch_api/internal/type/union.rbi b/rbi/finch_api/internal/type/union.rbi index 1a64742e..e8bcded8 100644 --- a/rbi/finch_api/internal/type/union.rbi +++ b/rbi/finch_api/internal/type/union.rbi @@ -16,7 +16,8 @@ module FinchAPI T::Array[ [ T.nilable(Symbol), - T.proc.returns(FinchAPI::Internal::Type::Converter::Input) + T.proc.returns(FinchAPI::Internal::Type::Converter::Input), + FinchAPI::Internal::AnyHash ] ] ) @@ -25,7 +26,13 @@ module FinchAPI end # @api private - sig { returns(T::Array[[T.nilable(Symbol), T.anything]]) } + sig do + returns( + T::Array[ + [T.nilable(Symbol), T.anything, FinchAPI::Internal::AnyHash] + ] + ) + end protected def derefed_variants end diff --git a/rbi/finch_api/models/disconnect_response.rbi b/rbi/finch_api/models/disconnect_response.rbi index b75b846c..3658d254 100644 --- a/rbi/finch_api/models/disconnect_response.rbi +++ b/rbi/finch_api/models/disconnect_response.rbi @@ -8,13 +8,13 @@ module FinchAPI T.any(FinchAPI::DisconnectResponse, FinchAPI::Internal::AnyHash) end - # If the request is successful, Finch will return “success” (HTTP 200 status). + # If the request is successful, Finch will return "success" (HTTP 200 status). sig { returns(String) } attr_accessor :status sig { params(status: String).returns(T.attached_class) } def self.new( - # If the request is successful, Finch will return “success” (HTTP 200 status). + # If the request is successful, Finch will return "success" (HTTP 200 status). status: ) end diff --git a/rbi/finch_api/models/jobs/automated_async_job.rbi b/rbi/finch_api/models/jobs/automated_async_job.rbi index e2376edc..0441aa78 100644 --- a/rbi/finch_api/models/jobs/automated_async_job.rbi +++ b/rbi/finch_api/models/jobs/automated_async_job.rbi @@ -43,7 +43,7 @@ module FinchAPI # The datetime a job is scheduled to be run. For scheduled jobs, this datetime can # be in the future if the job has not yet been enqueued. For ad-hoc jobs, this - # field will be null. + # field will be null. sig { returns(T.nilable(Time)) } attr_accessor :scheduled_at @@ -87,7 +87,7 @@ module FinchAPI params:, # The datetime a job is scheduled to be run. For scheduled jobs, this datetime can # be in the future if the job has not yet been enqueued. For ad-hoc jobs, this - # field will be null. + # field will be null. scheduled_at:, # The datetime a job entered into the job queue. started_at:, diff --git a/rbi/finch_api/models/jobs/automated_list_params.rbi b/rbi/finch_api/models/jobs/automated_list_params.rbi index 7a11e67e..04080485 100644 --- a/rbi/finch_api/models/jobs/automated_list_params.rbi +++ b/rbi/finch_api/models/jobs/automated_list_params.rbi @@ -15,6 +15,15 @@ module FinchAPI ) end + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + sig { returns(T.nilable(String)) } + attr_reader :entity_id + + sig { params(entity_id: String).void } + attr_writer :entity_id + # Number of items to return sig { returns(T.nilable(Integer)) } attr_reader :limit @@ -31,12 +40,17 @@ module FinchAPI sig do params( + entity_id: String, limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + entity_id: nil, # Number of items to return limit: nil, # Index to start from (defaults to 0) @@ -48,6 +62,7 @@ module FinchAPI sig do override.returns( { + entity_id: String, limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions diff --git a/rbi/finch_api/models/jobs/automated_retrieve_params.rbi b/rbi/finch_api/models/jobs/automated_retrieve_params.rbi index daa429b3..002a027e 100644 --- a/rbi/finch_api/models/jobs/automated_retrieve_params.rbi +++ b/rbi/finch_api/models/jobs/automated_retrieve_params.rbi @@ -15,15 +15,35 @@ module FinchAPI ) end + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + sig { returns(T.nilable(String)) } + attr_reader :entity_id + + sig { params(entity_id: String).void } + attr_writer :entity_id + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_id: String, + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + entity_id: nil, + request_options: {} + ) end - sig { override.returns({ request_options: FinchAPI::RequestOptions }) } + sig do + override.returns( + { entity_id: String, request_options: FinchAPI::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/finch_api/models/jobs/manual_async_job.rbi b/rbi/finch_api/models/jobs/manual_async_job.rbi index e8d6ea29..1c867312 100644 --- a/rbi/finch_api/models/jobs/manual_async_job.rbi +++ b/rbi/finch_api/models/jobs/manual_async_job.rbi @@ -10,7 +10,7 @@ module FinchAPI end # Specific information about the job, such as individual statuses for batch jobs. - sig { returns(T.nilable(T::Array[T.anything])) } + sig { returns(T.nilable(T::Array[T.nilable(T.anything)])) } attr_accessor :body sig { returns(String) } @@ -21,7 +21,7 @@ module FinchAPI sig do params( - body: T.nilable(T::Array[T.anything]), + body: T.nilable(T::Array[T.nilable(T.anything)]), job_id: String, status: FinchAPI::Jobs::ManualAsyncJob::Status::OrSymbol ).returns(T.attached_class) @@ -37,7 +37,7 @@ module FinchAPI sig do override.returns( { - body: T.nilable(T::Array[T.anything]), + body: T.nilable(T::Array[T.nilable(T.anything)]), job_id: String, status: FinchAPI::Jobs::ManualAsyncJob::Status::TaggedSymbol } diff --git a/rbi/finch_api/models/jobs/manual_retrieve_params.rbi b/rbi/finch_api/models/jobs/manual_retrieve_params.rbi index 1b6a3dad..6daf52ae 100644 --- a/rbi/finch_api/models/jobs/manual_retrieve_params.rbi +++ b/rbi/finch_api/models/jobs/manual_retrieve_params.rbi @@ -15,15 +15,35 @@ module FinchAPI ) end + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + sig { returns(T.nilable(String)) } + attr_reader :entity_id + + sig { params(entity_id: String).void } + attr_writer :entity_id + sig do - params(request_options: FinchAPI::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + entity_id: String, + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + entity_id: nil, + request_options: {} + ) end - sig { override.returns({ request_options: FinchAPI::RequestOptions }) } + sig do + override.returns( + { entity_id: String, request_options: FinchAPI::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/finch_api/models/request_forwarding_forward_response.rbi b/rbi/finch_api/models/request_forwarding_forward_response.rbi index 85f514a3..fea3bfbd 100644 --- a/rbi/finch_api/models/request_forwarding_forward_response.rbi +++ b/rbi/finch_api/models/request_forwarding_forward_response.rbi @@ -11,14 +11,14 @@ module FinchAPI ) end - # A string representation of the HTTP response body of the forwarded request’s - # response received from the underlying integration’s API. This field may be null - # in the case where the upstream system’s response is empty. + # A string representation of the HTTP response body of the forwarded request's + # response received from the underlying integration's API. This field may be null + # in the case where the upstream system's response is empty. sig { returns(T.nilable(String)) } attr_accessor :data - # The HTTP headers of the forwarded request’s response, exactly as received from - # the underlying integration’s API. + # The HTTP headers of the forwarded request's response, exactly as received from + # the underlying integration's API. sig { returns(T.nilable(T.anything)) } attr_accessor :headers @@ -37,8 +37,8 @@ module FinchAPI end attr_writer :request - # The HTTP status code of the forwarded request’s response, exactly received from - # the underlying integration’s API. This value will be returned as an integer. + # The HTTP status code of the forwarded request's response, exactly received from + # the underlying integration's API. This value will be returned as an integer. sig { returns(Integer) } attr_accessor :status_code @@ -52,18 +52,18 @@ module FinchAPI ).returns(T.attached_class) end def self.new( - # A string representation of the HTTP response body of the forwarded request’s - # response received from the underlying integration’s API. This field may be null - # in the case where the upstream system’s response is empty. + # A string representation of the HTTP response body of the forwarded request's + # response received from the underlying integration's API. This field may be null + # in the case where the upstream system's response is empty. data:, - # The HTTP headers of the forwarded request’s response, exactly as received from - # the underlying integration’s API. + # The HTTP headers of the forwarded request's response, exactly as received from + # the underlying integration's API. headers:, # An object containing details of your original forwarded request, for your ease # of reference. request:, - # The HTTP status code of the forwarded request’s response, exactly received from - # the underlying integration’s API. This value will be returned as an integer. + # The HTTP status code of the forwarded request's response, exactly received from + # the underlying integration's API. This value will be returned as an integer. status_code: ) end diff --git a/rbi/finch_api/resources/jobs/automated.rbi b/rbi/finch_api/resources/jobs/automated.rbi index 8a14e34f..34d2f712 100644 --- a/rbi/finch_api/resources/jobs/automated.rbi +++ b/rbi/finch_api/resources/jobs/automated.rbi @@ -37,10 +37,18 @@ module FinchAPI sig do params( job_id: String, + entity_id: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Jobs::AutomatedAsyncJob) end - def retrieve(job_id, request_options: {}) + def retrieve( + job_id, + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + entity_id: nil, + request_options: {} + ) end # Get all automated jobs. Automated jobs are completed by a machine. By default, @@ -48,12 +56,17 @@ module FinchAPI # as data syncs, only the next scheduled job is shown. sig do params( + entity_id: String, limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Models::Jobs::AutomatedListResponse) end def list( + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + entity_id: nil, # Number of items to return limit: nil, # Index to start from (defaults to 0) diff --git a/rbi/finch_api/resources/jobs/manual.rbi b/rbi/finch_api/resources/jobs/manual.rbi index ca91bfdb..2e9a3ec6 100644 --- a/rbi/finch_api/resources/jobs/manual.rbi +++ b/rbi/finch_api/resources/jobs/manual.rbi @@ -9,10 +9,18 @@ module FinchAPI sig do params( job_id: String, + entity_id: String, request_options: FinchAPI::RequestOptions::OrHash ).returns(FinchAPI::Jobs::ManualAsyncJob) end - def retrieve(job_id, request_options: {}) + def retrieve( + job_id, + # The entity ID to use when authenticating with a multi-account token. Required + # when using a multi-account token to specify which entity's data to access. + # Example: `123e4567-e89b-12d3-a456-426614174000` + entity_id: nil, + request_options: {} + ) end # @api private diff --git a/rbi/finch_api/resources/request_forwarding.rbi b/rbi/finch_api/resources/request_forwarding.rbi index d1f44e45..50ec19c3 100644 --- a/rbi/finch_api/resources/request_forwarding.rbi +++ b/rbi/finch_api/resources/request_forwarding.rbi @@ -4,8 +4,8 @@ module FinchAPI module Resources class RequestForwarding # The Forward API allows you to make direct requests to an employment system. If - # Finch’s unified API doesn’t have a data model that cleanly fits your needs, then - # Forward allows you to push or pull data models directly against an integration’s + # Finch's unified API doesn't have a data model that cleanly fits your needs, then + # Forward allows you to push or pull data models directly against an integration's # API. sig do params( diff --git a/scripts/mock b/scripts/mock index d2814ae6..0b28f6ea 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" fi diff --git a/scripts/test b/scripts/test index 8e5d35cd..e0dc1374 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! prism_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the prism command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" echo exit 1 diff --git a/sig/finch_api/internal/type/converter.rbs b/sig/finch_api/internal/type/converter.rbs index dc39f1a3..09b92a4b 100644 --- a/sig/finch_api/internal/type/converter.rbs +++ b/sig/finch_api/internal/type/converter.rbs @@ -39,6 +39,23 @@ module FinchAPI | FinchAPI::Internal::Type::Converter::input spec ) -> (^-> top) + def self.meta_info: ( + { + const: (nil | bool | Integer | Float | Symbol)?, + enum: ^-> FinchAPI::Internal::Type::Converter::input?, + union: ^-> FinchAPI::Internal::Type::Converter::input? + } + | ^-> FinchAPI::Internal::Type::Converter::input + | FinchAPI::Internal::Type::Converter::input type_info, + { + const: (nil | bool | Integer | Float | Symbol)?, + enum: ^-> FinchAPI::Internal::Type::Converter::input?, + union: ^-> FinchAPI::Internal::Type::Converter::input? + } + | ^-> FinchAPI::Internal::Type::Converter::input + | FinchAPI::Internal::Type::Converter::input spec + ) -> ::Hash[Symbol, top] + def self.new_coerce_state: ( ?translate_names: bool ) -> FinchAPI::Internal::Type::Converter::coerce_state diff --git a/sig/finch_api/internal/type/union.rbs b/sig/finch_api/internal/type/union.rbs index c8552a74..df4af048 100644 --- a/sig/finch_api/internal/type/union.rbs +++ b/sig/finch_api/internal/type/union.rbs @@ -5,9 +5,9 @@ module FinchAPI include FinchAPI::Internal::Type::Converter include FinchAPI::Internal::Util::SorbetRuntimeSupport - private def self.known_variants: -> ::Array[[Symbol?, (^-> FinchAPI::Internal::Type::Converter::input)]] + private def self.known_variants: -> ::Array[[Symbol?, (^-> FinchAPI::Internal::Type::Converter::input), ::Hash[Symbol, top]]] - def self.derefed_variants: -> ::Array[[Symbol?, top]] + def self.derefed_variants: -> ::Array[[Symbol?, top, ::Hash[Symbol, top]]] def self.variants: -> ::Array[top] diff --git a/sig/finch_api/models/jobs/automated_list_params.rbs b/sig/finch_api/models/jobs/automated_list_params.rbs index 291e0932..beda5dca 100644 --- a/sig/finch_api/models/jobs/automated_list_params.rbs +++ b/sig/finch_api/models/jobs/automated_list_params.rbs @@ -2,13 +2,17 @@ module FinchAPI module Models module Jobs type automated_list_params = - { limit: Integer, offset: Integer } + { entity_id: String, limit: Integer, offset: Integer } & FinchAPI::Internal::Type::request_parameters class AutomatedListParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters + attr_reader entity_id: String? + + def entity_id=: (String) -> String + attr_reader limit: Integer? def limit=: (Integer) -> Integer @@ -18,12 +22,14 @@ module FinchAPI def offset=: (Integer) -> Integer def initialize: ( + ?entity_id: String, ?limit: Integer, ?offset: Integer, ?request_options: FinchAPI::request_opts ) -> void def to_hash: -> { + entity_id: String, limit: Integer, offset: Integer, request_options: FinchAPI::RequestOptions diff --git a/sig/finch_api/models/jobs/automated_retrieve_params.rbs b/sig/finch_api/models/jobs/automated_retrieve_params.rbs index f7c8cfa0..5d80ee70 100644 --- a/sig/finch_api/models/jobs/automated_retrieve_params.rbs +++ b/sig/finch_api/models/jobs/automated_retrieve_params.rbs @@ -2,15 +2,25 @@ module FinchAPI module Models module Jobs type automated_retrieve_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_id: String } & FinchAPI::Internal::Type::request_parameters class AutomatedRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_id: String? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_id=: (String) -> String + + def initialize: ( + ?entity_id: String, + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_id: String, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/models/jobs/manual_async_job.rbs b/sig/finch_api/models/jobs/manual_async_job.rbs index 9f5c52f7..38dd5205 100644 --- a/sig/finch_api/models/jobs/manual_async_job.rbs +++ b/sig/finch_api/models/jobs/manual_async_job.rbs @@ -3,26 +3,26 @@ module FinchAPI module Jobs type manual_async_job = { - body: ::Array[top]?, + body: ::Array[top?]?, job_id: String, status: FinchAPI::Models::Jobs::ManualAsyncJob::status } class ManualAsyncJob < FinchAPI::Internal::Type::BaseModel - attr_accessor body: ::Array[top]? + attr_accessor body: ::Array[top?]? attr_accessor job_id: String attr_accessor status: FinchAPI::Models::Jobs::ManualAsyncJob::status def initialize: ( - body: ::Array[top]?, + body: ::Array[top?]?, job_id: String, status: FinchAPI::Models::Jobs::ManualAsyncJob::status ) -> void def to_hash: -> { - body: ::Array[top]?, + body: ::Array[top?]?, job_id: String, status: FinchAPI::Models::Jobs::ManualAsyncJob::status } diff --git a/sig/finch_api/models/jobs/manual_retrieve_params.rbs b/sig/finch_api/models/jobs/manual_retrieve_params.rbs index 0a765cf5..644e08a6 100644 --- a/sig/finch_api/models/jobs/manual_retrieve_params.rbs +++ b/sig/finch_api/models/jobs/manual_retrieve_params.rbs @@ -2,15 +2,25 @@ module FinchAPI module Models module Jobs type manual_retrieve_params = - { } & FinchAPI::Internal::Type::request_parameters + { entity_id: String } & FinchAPI::Internal::Type::request_parameters class ManualRetrieveParams < FinchAPI::Internal::Type::BaseModel extend FinchAPI::Internal::Type::RequestParameters::Converter include FinchAPI::Internal::Type::RequestParameters - def initialize: (?request_options: FinchAPI::request_opts) -> void + attr_reader entity_id: String? - def to_hash: -> { request_options: FinchAPI::RequestOptions } + def entity_id=: (String) -> String + + def initialize: ( + ?entity_id: String, + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_id: String, + request_options: FinchAPI::RequestOptions + } end end end diff --git a/sig/finch_api/resources/jobs/automated.rbs b/sig/finch_api/resources/jobs/automated.rbs index f23f755c..f97a6fad 100644 --- a/sig/finch_api/resources/jobs/automated.rbs +++ b/sig/finch_api/resources/jobs/automated.rbs @@ -10,10 +10,12 @@ module FinchAPI def retrieve: ( String job_id, + ?entity_id: String, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Jobs::AutomatedAsyncJob def list: ( + ?entity_id: String, ?limit: Integer, ?offset: Integer, ?request_options: FinchAPI::request_opts diff --git a/sig/finch_api/resources/jobs/manual.rbs b/sig/finch_api/resources/jobs/manual.rbs index 41f4515e..365fe1a7 100644 --- a/sig/finch_api/resources/jobs/manual.rbs +++ b/sig/finch_api/resources/jobs/manual.rbs @@ -4,6 +4,7 @@ module FinchAPI class Manual def retrieve: ( String job_id, + ?entity_id: String, ?request_options: FinchAPI::request_opts ) -> FinchAPI::Jobs::ManualAsyncJob diff --git a/test/finch_api/internal/type/base_model_test.rb b/test/finch_api/internal/type/base_model_test.rb index 02ea4cb1..6cf9befe 100644 --- a/test/finch_api/internal/type/base_model_test.rb +++ b/test/finch_api/internal/type/base_model_test.rb @@ -687,3 +687,35 @@ def test_equality end end end + +class FinchAPI::Test::MetaInfoTest < Minitest::Test + A1 = FinchAPI::Internal::Type::ArrayOf[Integer, nil?: true, doc: "dog"] + H1 = FinchAPI::Internal::Type::HashOf[-> { String }, nil?: true, doc: "dawg"] + + class M1 < FinchAPI::Internal::Type::BaseModel + required :a, Integer, doc: "dog" + optional :b, -> { String }, nil?: true, doc: "dawg" + end + + module U1 + extend FinchAPI::Internal::Type::Union + + variant -> { Integer }, const: 2, doc: "dog" + variant -> { String }, doc: "dawg" + end + + def test_meta_retrieval + m1 = A1.instance_variable_get(:@meta) + m2 = H1.instance_variable_get(:@meta) + assert_equal({doc: "dog"}, m1) + assert_equal({doc: "dawg"}, m2) + + ma, mb = M1.fields.fetch_values(:a, :b) + assert_equal({doc: "dog"}, ma.fetch(:meta)) + assert_equal({doc: "dawg"}, mb.fetch(:meta)) + + ua, ub = U1.send(:known_variants).map(&:last) + assert_equal({doc: "dog"}, ua) + assert_equal({doc: "dawg"}, ub) + end +end diff --git a/test/finch_api/resources/jobs/manual_test.rb b/test/finch_api/resources/jobs/manual_test.rb index f59d4fbc..eb0ab2b8 100644 --- a/test/finch_api/resources/jobs/manual_test.rb +++ b/test/finch_api/resources/jobs/manual_test.rb @@ -12,7 +12,7 @@ def test_retrieve assert_pattern do response => { - body: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown]) | nil, + body: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Internal::Type::Unknown, nil?: true]) | nil, job_id: String, status: FinchAPI::Jobs::ManualAsyncJob::Status }