From a8f432a47e2e5ffbb1be53637b672383301d1baf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 19:12:21 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- lib/finch_api/models/introspection.rb | 31 +++++++++++++++- rbi/finch_api/models/introspection.rbi | 47 ++++++++++++++++++++++++ sig/finch_api/models/introspection.rbs | 27 ++++++++++++++ test/finch_api/resources/account_test.rb | 2 + 5 files changed, 108 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9d73576a..ff867f70 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-6d0c6a1feba5ccb895a6779cd98c2a0ae87d6394f5e98a9da51f17258c4eb297.yml -openapi_spec_hash: ac3be0c8a992103e5f467fe1bcb20a81 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bf86910e96e83e583689cf5d1a5c583268754026ec68288994fa6a969dc248f2.yml +openapi_spec_hash: 195038e056891afec204c49dadce3b95 config_hash: 5146b12344dae76238940989dac1e8a0 diff --git a/lib/finch_api/models/introspection.rb b/lib/finch_api/models/introspection.rb index 0733d8ce..3aa7cd50 100644 --- a/lib/finch_api/models/introspection.rb +++ b/lib/finch_api/models/introspection.rb @@ -99,6 +99,18 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :customer_name, String, nil?: true + # @!attribute entity_ids + # Array of entity IDs associated with this connection. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!attribute entity_mode + # Indicates whether this connection manages a single entity or multiple entities. + # + # @return [Symbol, FinchAPI::Models::Introspection::EntityMode, nil] + optional :entity_mode, enum: -> { FinchAPI::Introspection::EntityMode } + # @!attribute manual # Whether the connection associated with the `access_token` uses the Assisted # Connect Flow. (`true` if using Assisted Connect, `false` if connection is @@ -122,7 +134,7 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # @return [String, nil] optional :username, String, nil?: true - # @!method initialize(id:, client_id:, client_type:, connection_id:, connection_status:, connection_type:, products:, provider_id:, account_id: nil, authentication_methods: nil, company_id: nil, customer_email: nil, customer_id: nil, customer_name: nil, manual: nil, payroll_provider_id: nil, username: nil) + # @!method initialize(id:, client_id:, client_type:, connection_id:, connection_status:, connection_type:, products:, provider_id:, account_id: nil, authentication_methods: nil, company_id: nil, customer_email: nil, customer_id: nil, customer_name: nil, entity_ids: nil, entity_mode: nil, manual: nil, payroll_provider_id: nil, username: nil) # Some parameter documentations has been truncated, see # {FinchAPI::Models::Introspection} for more details. # @@ -154,6 +166,10 @@ class Introspection < FinchAPI::Internal::Type::BaseModel # # @param customer_name [String, nil] The name of your customer you provided to Finch when a connect session was creat # + # @param entity_ids [Array] Array of entity IDs associated with this connection. + # + # @param entity_mode [Symbol, FinchAPI::Models::Introspection::EntityMode] Indicates whether this connection manages a single entity or multiple entities. + # # @param manual [Boolean] Whether the connection associated with the `access_token` uses the Assisted Conn # # @param payroll_provider_id [String] [DEPRECATED] Use `provider_id` to identify the provider instead of this payroll @@ -317,6 +333,19 @@ module LastSuccessfulSync end end end + + # Indicates whether this connection manages a single entity or multiple entities. + # + # @see FinchAPI::Models::Introspection#entity_mode + module EntityMode + extend FinchAPI::Internal::Type::Enum + + SINGLE = :single + MULTI = :multi + + # @!method self.values + # @return [Array] + end end end end diff --git a/rbi/finch_api/models/introspection.rbi b/rbi/finch_api/models/introspection.rbi index 336784b3..e98a1009 100644 --- a/rbi/finch_api/models/introspection.rbi +++ b/rbi/finch_api/models/introspection.rbi @@ -95,6 +95,24 @@ module FinchAPI sig { returns(T.nilable(String)) } attr_accessor :customer_name + # Array of entity IDs associated with this connection. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + + # Indicates whether this connection manages a single entity or multiple entities. + sig do + returns(T.nilable(FinchAPI::Introspection::EntityMode::TaggedSymbol)) + end + attr_reader :entity_mode + + sig do + params(entity_mode: FinchAPI::Introspection::EntityMode::OrSymbol).void + end + attr_writer :entity_mode + # Whether the connection associated with the `access_token` uses the Assisted # Connect Flow. (`true` if using Assisted Connect, `false` if connection is # automated) @@ -133,6 +151,8 @@ module FinchAPI customer_email: T.nilable(String), customer_id: T.nilable(String), customer_name: T.nilable(String), + entity_ids: T::Array[String], + entity_mode: FinchAPI::Introspection::EntityMode::OrSymbol, manual: T::Boolean, payroll_provider_id: String, username: T.nilable(String) @@ -173,6 +193,10 @@ module FinchAPI # The name of your customer you provided to Finch when a connect session was # created for this connection customer_name: nil, + # Array of entity IDs associated with this connection. + entity_ids: nil, + # Indicates whether this connection manages a single entity or multiple entities. + entity_mode: nil, # Whether the connection associated with the `access_token` uses the Assisted # Connect Flow. (`true` if using Assisted Connect, `false` if connection is # automated) @@ -204,6 +228,8 @@ module FinchAPI customer_email: T.nilable(String), customer_id: T.nilable(String), customer_name: T.nilable(String), + entity_ids: T::Array[String], + entity_mode: FinchAPI::Introspection::EntityMode::TaggedSymbol, manual: T::Boolean, payroll_provider_id: String, username: T.nilable(String) @@ -544,6 +570,27 @@ module FinchAPI end end end + + # Indicates whether this connection manages a single entity or multiple entities. + module EntityMode + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, FinchAPI::Introspection::EntityMode) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SINGLE = + T.let(:single, FinchAPI::Introspection::EntityMode::TaggedSymbol) + MULTI = T.let(:multi, FinchAPI::Introspection::EntityMode::TaggedSymbol) + + sig do + override.returns( + T::Array[FinchAPI::Introspection::EntityMode::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/sig/finch_api/models/introspection.rbs b/sig/finch_api/models/introspection.rbs index 61a6680a..3e9d33e7 100644 --- a/sig/finch_api/models/introspection.rbs +++ b/sig/finch_api/models/introspection.rbs @@ -16,6 +16,8 @@ module FinchAPI customer_email: String?, customer_id: String?, customer_name: String?, + entity_ids: ::Array[String], + entity_mode: FinchAPI::Models::Introspection::entity_mode, manual: bool, payroll_provider_id: String, username: String? @@ -58,6 +60,16 @@ module FinchAPI attr_accessor customer_name: String? + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + + attr_reader entity_mode: FinchAPI::Models::Introspection::entity_mode? + + def entity_mode=: ( + FinchAPI::Models::Introspection::entity_mode + ) -> FinchAPI::Models::Introspection::entity_mode + attr_reader manual: bool? def manual=: (bool) -> bool @@ -83,6 +95,8 @@ module FinchAPI ?customer_email: String?, ?customer_id: String?, ?customer_name: String?, + ?entity_ids: ::Array[String], + ?entity_mode: FinchAPI::Models::Introspection::entity_mode, ?manual: bool, ?payroll_provider_id: String, ?username: String? @@ -103,6 +117,8 @@ module FinchAPI customer_email: String?, customer_id: String?, customer_name: String?, + entity_ids: ::Array[String], + entity_mode: FinchAPI::Models::Introspection::entity_mode, manual: bool, payroll_provider_id: String, username: String? @@ -252,6 +268,17 @@ module FinchAPI end end end + + type entity_mode = :single | :multi + + module EntityMode + extend FinchAPI::Internal::Type::Enum + + SINGLE: :single + MULTI: :multi + + def self?.values: -> ::Array[FinchAPI::Models::Introspection::entity_mode] + end end end end diff --git a/test/finch_api/resources/account_test.rb b/test/finch_api/resources/account_test.rb index 93bc1933..0918a3d3 100644 --- a/test/finch_api/resources/account_test.rb +++ b/test/finch_api/resources/account_test.rb @@ -40,6 +40,8 @@ def test_introspect customer_email: String | nil, customer_id: String | nil, customer_name: String | nil, + entity_ids: ^(FinchAPI::Internal::Type::ArrayOf[String]) | nil, + entity_mode: FinchAPI::Introspection::EntityMode | nil, manual: FinchAPI::Internal::Type::Boolean | nil, payroll_provider_id: String | nil, username: String | nil From fb7c50272db37e9f950bf2d47e1a9c1db178940a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 19:12:44 +0000 Subject: [PATCH 2/2] release: 0.1.0-alpha.29 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/finch_api/version.rb | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f4710698..c412e974 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.28" + ".": "0.1.0-alpha.29" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index dff095a2..90637814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.29 (2025-08-21) + +Full Changelog: [v0.1.0-alpha.28...v0.1.0-alpha.29](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.28...v0.1.0-alpha.29) + +### Features + +* **api:** api update ([a8f432a](https://github.com/Finch-API/finch-api-ruby/commit/a8f432a47e2e5ffbb1be53637b672383301d1baf)) + ## 0.1.0-alpha.28 (2025-08-20) Full Changelog: [v0.1.0-alpha.27...v0.1.0-alpha.28](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.27...v0.1.0-alpha.28) diff --git a/Gemfile.lock b/Gemfile.lock index 5f845b77..8ae7e139 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.28) + finch-api (0.1.0.pre.alpha.29) connection_pool GEM diff --git a/README.md b/README.md index f17517c7..ec81c90a 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.28" +gem "finch-api", "~> 0.1.0.pre.alpha.29" ``` diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index 9be2c98d..818ecc34 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.28" + VERSION = "0.1.0.pre.alpha.29" end