Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "9.9.0"
".": "9.10.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 46
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-82224679b895da7c7a5aae44d11b69fbe37d0316cd8e10aa0c89bc5a68f424de.yml
configured_endpoints: 48
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-5092370ef89959c46138a85f9d6d3c919682a5492a0f9f85ac4421de702f35a8.yml
openapi_spec_hash: a4ca94b3405fc83934c949068943e16c
config_hash: fce67e71044aa4c3d0b8030052b3a20b
config_hash: a1c4b7d897cbf8ed42c5f474b3161d79
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 9.10.0 (2026-05-12)

Full Changelog: [v9.9.0...v9.10.0](https://github.com/Finch-API/finch-api-node/compare/v9.9.0...v9.10.0)

### Features

* **api:** add register benefits method ([4720df6](https://github.com/Finch-API/finch-api-node/commit/4720df6f2050e3c9c2aeea2c73e1d22e175d523a))

## 9.9.0 (2026-05-12)

Full Changelog: [v9.8.0...v9.9.0](https://github.com/Finch-API/finch-api-node/compare/v9.8.0...v9.9.0)
Expand Down
1 change: 1 addition & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ client.example.list(undefined, { headers: { ... } });
- `client.hris.benefits.update()`
- `client.hris.benefits.list()`
- `client.hris.benefits.listSupportedBenefits()`
- `client.hris.benefits.register()`
- `client.hris.benefits.individuals.enrollMany()`
- `client.hris.benefits.individuals.enrolledIDs()`
- `client.hris.benefits.individuals.retrieveManyBenefits()`
Expand Down
4 changes: 4 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ Types:
- <code><a href="./src/resources/hris/benefits/benefits.ts">BenefitsSupport</a></code>
- <code><a href="./src/resources/hris/benefits/benefits.ts">CompanyBenefit</a></code>
- <code><a href="./src/resources/hris/benefits/benefits.ts">CreateCompanyBenefitsResponse</a></code>
- <code><a href="./src/resources/hris/benefits/benefits.ts">RegisterCompanyBenefitResponse</a></code>
- <code><a href="./src/resources/hris/benefits/benefits.ts">SupportPerBenefitType</a></code>
- <code><a href="./src/resources/hris/benefits/benefits.ts">SupportedBenefit</a></code>
- <code><a href="./src/resources/hris/benefits/benefits.ts">UpdateCompanyBenefitResponse</a></code>
Expand All @@ -161,6 +162,7 @@ Methods:
- <code title="post /employer/benefits/{benefit_id}">client.hris.benefits.<a href="./src/resources/hris/benefits/benefits.ts">update</a>(benefitID, { ...params }) -> UpdateCompanyBenefitResponse</code>
- <code title="get /employer/benefits">client.hris.benefits.<a href="./src/resources/hris/benefits/benefits.ts">list</a>({ ...params }) -> CompanyBenefitsSinglePage</code>
- <code title="get /employer/benefits/meta">client.hris.benefits.<a href="./src/resources/hris/benefits/benefits.ts">listSupportedBenefits</a>({ ...params }) -> SupportedBenefitsSinglePage</code>
- <code title="post /employer/benefits/register">client.hris.benefits.<a href="./src/resources/hris/benefits/benefits.ts">register</a>({ ...params }) -> RegisterCompanyBenefitResponse</code>

### Individuals

Expand Down Expand Up @@ -193,12 +195,14 @@ Methods:

Types:

- <code><a href="./src/resources/account.ts">DisconnectEntityResponse</a></code>
- <code><a href="./src/resources/account.ts">DisconnectResponse</a></code>
- <code><a href="./src/resources/account.ts">Introspection</a></code>

Methods:

- <code title="post /disconnect">client.account.<a href="./src/resources/account.ts">disconnect</a>() -> DisconnectResponse</code>
- <code title="post /disconnect-entity">client.account.<a href="./src/resources/account.ts">disconnectEntity</a>({ ...params }) -> DisconnectEntityResponse</code>
- <code title="get /introspect">client.account.<a href="./src/resources/account.ts">introspect</a>() -> Introspection</code>

# Webhooks
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryfinch/finch-api",
"version": "9.9.0",
"version": "9.10.0",
"description": "The official TypeScript library for the Finch API",
"author": "Finch <founders@tryfinch.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dxt_version": "0.2",
"name": "@tryfinch/finch-api-mcp",
"version": "9.9.0",
"version": "9.10.0",
"description": "The official MCP Server for the Finch API",
"author": {
"name": "Finch",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryfinch/finch-api-mcp",
"version": "9.9.0",
"version": "9.10.0",
"description": "The official MCP Server for the Finch API",
"author": "Finch <founders@tryfinch.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions packages/mcp-server/src/code-tool-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const fuse = new Fuse(
'client.hris.benefits.create',
'client.hris.benefits.list',
'client.hris.benefits.listSupportedBenefits',
'client.hris.benefits.register',
'client.hris.benefits.retrieve',
'client.hris.benefits.update',
'client.hris.benefits.individuals.enrollMany',
Expand All @@ -134,6 +135,7 @@ const fuse = new Fuse(
'client.hris.benefits.individuals.unenrollMany',
'client.providers.list',
'client.account.disconnect',
'client.account.disconnectEntity',
'client.account.introspect',
'client.requestForwarding.forward',
'client.jobs.automated.create',
Expand Down
105 changes: 105 additions & 0 deletions packages/mcp-server/src/local-docs-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,61 @@ const EMBEDDED_METHODS: MethodEntry[] = [
},
},
},
{
name: 'register',
endpoint: '/employer/benefits/register',
httpMethod: 'post',
summary: 'Register Deduction',
description:
"Register existing benefits from the customer on the provider, on Finch's end. Please use the `/provider` endpoint to view available types for each provider.",
stainlessPath: '(resource) hris.benefits > (method) register',
qualified: 'client.hris.benefits.register',
params: [
'entity_ids?: string[];',
'description?: string;',
"frequency?: 'every_paycheck' | 'monthly' | 'one_time';",
'type?: string;',
],
response: '{ benefit_id: string; job_id: string; }',
markdown:
"## register\n\n`client.hris.benefits.register(entity_ids?: string[], description?: string, frequency?: 'every_paycheck' | 'monthly' | 'one_time', type?: string): { benefit_id: string; job_id: string; }`\n\n**post** `/employer/benefits/register`\n\nRegister existing benefits from the customer on the provider, on Finch's end. Please use the `/provider` endpoint to view available types for each provider.\n\n### Parameters\n\n- `entity_ids?: string[]`\n The entity IDs to specify which entities' data to access.\n\n- `description?: string`\n\n- `frequency?: 'every_paycheck' | 'monthly' | 'one_time'`\n The frequency of the benefit deduction/contribution.\n\n- `type?: string`\n Type of benefit.\n\n### Returns\n\n- `{ benefit_id: string; job_id: string; }`\n\n - `benefit_id: string`\n - `job_id: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst registerCompanyBenefitResponse = await client.hris.benefits.register();\n\nconsole.log(registerCompanyBenefitResponse);\n```",
perLanguage: {
typescript: {
method: 'client.hris.benefits.register',
example:
"import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\nconst registerCompanyBenefitResponse = await client.hris.benefits.register();\n\nconsole.log(registerCompanyBenefitResponse.benefit_id);",
},
python: {
method: 'hris.benefits.register',
example:
'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\nregister_company_benefit_response = client.hris.benefits.register()\nprint(register_company_benefit_response.benefit_id)',
},
java: {
method: 'hris().benefits().register',
example:
'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisBenefitRegisterParams;\nimport com.tryfinch.api.models.RegisterCompanyBenefitResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n RegisterCompanyBenefitResponse registerCompanyBenefitResponse = client.hris().benefits().register();\n }\n}',
},
kotlin: {
method: 'hris().benefits().register',
example:
'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisBenefitRegisterParams\nimport com.tryfinch.api.models.RegisterCompanyBenefitResponse\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val registerCompanyBenefitResponse: RegisterCompanyBenefitResponse = client.hris().benefits().register()\n}',
},
go: {
method: 'client.HRIS.Benefits.Register',
example:
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\tregisterCompanyBenefitResponse, err := client.HRIS.Benefits.Register(context.TODO(), finchgo.HRISBenefitRegisterParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", registerCompanyBenefitResponse.BenefitID)\n}\n',
},
ruby: {
method: 'hris.benefits.register',
example:
'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\nregister_company_benefit_response = finch.hris.benefits.register\n\nputs(register_company_benefit_response)',
},
http: {
example:
'curl https://api.tryfinch.com/employer/benefits/register \\\n -X POST \\\n -H \'Finch-API-Version: 2020-09-17\' \\\n -H "Authorization: Bearer $ACCESS_TOKEN"',
},
},
},
{
name: 'enrolled_ids',
endpoint: '/employer/benefits/{benefit_id}/enrolled',
Expand Down Expand Up @@ -1420,6 +1475,56 @@ const EMBEDDED_METHODS: MethodEntry[] = [
},
},
},
{
name: 'disconnect_entity',
endpoint: '/disconnect-entity',
httpMethod: 'post',
summary: 'Disconnect Entity',
description:
'Disconnect entity(s) from a connection without affecting other entities associated with the same connection.',
stainlessPath: '(resource) account > (method) disconnect_entity',
qualified: 'client.account.disconnectEntity',
params: ['entity_ids: string[];'],
response: '{ status: string; }',
markdown:
"## disconnect_entity\n\n`client.account.disconnectEntity(entity_ids: string[]): { status: string; }`\n\n**post** `/disconnect-entity`\n\nDisconnect entity(s) from a connection without affecting other entities associated with the same connection.\n\n### Parameters\n\n- `entity_ids: string[]`\n Array of entity UUIDs to disconnect. At least one entity ID must be provided.\n\n### Returns\n\n- `{ status: string; }`\n\n - `status: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst disconnectEntityResponse = await client.account.disconnectEntity({ entity_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a', '5e6f7a8b-9c10-4d11-a12b-c13d14e15f16'] });\n\nconsole.log(disconnectEntityResponse);\n```",
perLanguage: {
typescript: {
method: 'client.account.disconnectEntity',
example:
"import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\nconst disconnectEntityResponse = await client.account.disconnectEntity({\n entity_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a', '5e6f7a8b-9c10-4d11-a12b-c13d14e15f16'],\n});\n\nconsole.log(disconnectEntityResponse.status);",
},
python: {
method: 'account.disconnect_entity',
example:
'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\ndisconnect_entity_response = client.account.disconnect_entity(\n entity_ids=["3c90c3cc-0d44-4b50-8888-8dd25736052a", "5e6f7a8b-9c10-4d11-a12b-c13d14e15f16"],\n)\nprint(disconnect_entity_response.status)',
},
java: {
method: 'account().disconnectEntity',
example:
'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.AccountDisconnectEntityParams;\nimport com.tryfinch.api.models.DisconnectEntityResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n AccountDisconnectEntityParams params = AccountDisconnectEntityParams.builder()\n .addEntityId("3c90c3cc-0d44-4b50-8888-8dd25736052a")\n .addEntityId("5e6f7a8b-9c10-4d11-a12b-c13d14e15f16")\n .build();\n DisconnectEntityResponse disconnectEntityResponse = client.account().disconnectEntity(params);\n }\n}',
},
kotlin: {
method: 'account().disconnectEntity',
example:
'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.AccountDisconnectEntityParams\nimport com.tryfinch.api.models.DisconnectEntityResponse\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val params: AccountDisconnectEntityParams = AccountDisconnectEntityParams.builder()\n .addEntityId("3c90c3cc-0d44-4b50-8888-8dd25736052a")\n .addEntityId("5e6f7a8b-9c10-4d11-a12b-c13d14e15f16")\n .build()\n val disconnectEntityResponse: DisconnectEntityResponse = client.account().disconnectEntity(params)\n}',
},
go: {
method: 'client.Account.DisconnectEntity',
example:
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\tdisconnectEntityResponse, err := client.Account.DisconnectEntity(context.TODO(), finchgo.AccountDisconnectEntityParams{\n\t\tEntityIDs: finchgo.F([]string{"3c90c3cc-0d44-4b50-8888-8dd25736052a", "5e6f7a8b-9c10-4d11-a12b-c13d14e15f16"}),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", disconnectEntityResponse.Status)\n}\n',
},
ruby: {
method: 'account.disconnect_entity',
example:
'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\ndisconnect_entity_response = finch.account.disconnect_entity(\n entity_ids: ["3c90c3cc-0d44-4b50-8888-8dd25736052a", "5e6f7a8b-9c10-4d11-a12b-c13d14e15f16"]\n)\n\nputs(disconnect_entity_response)',
},
http: {
example:
'curl https://api.tryfinch.com/disconnect-entity \\\n -H \'Content-Type: application/json\' \\\n -H \'Finch-API-Version: 2020-09-17\' \\\n -H "Authorization: Bearer $ACCESS_TOKEN" \\\n -d \'{\n "entity_ids": [\n "3c90c3cc-0d44-4b50-8888-8dd25736052a",\n "5e6f7a8b-9c10-4d11-a12b-c13d14e15f16"\n ]\n }\'',
},
},
},
{
name: 'forward',
endpoint: '/forward',
Expand Down
12 changes: 12 additions & 0 deletions packages/mcp-server/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ export const sdkMethods: SdkMethod[] = [
httpMethod: 'get',
httpPath: '/employer/benefits/meta',
},
{
clientCallName: 'client.hris.benefits.register',
fullyQualifiedName: 'hris.benefits.register',
httpMethod: 'post',
httpPath: '/employer/benefits/register',
},
{
clientCallName: 'client.hris.benefits.individuals.enrollMany',
fullyQualifiedName: 'hris.benefits.individuals.enrollMany',
Expand Down Expand Up @@ -164,6 +170,12 @@ export const sdkMethods: SdkMethod[] = [
httpMethod: 'post',
httpPath: '/disconnect',
},
{
clientCallName: 'client.account.disconnectEntity',
fullyQualifiedName: 'account.disconnectEntity',
httpMethod: 'post',
httpPath: '/disconnect-entity',
},
{
clientCallName: 'client.account.introspect',
fullyQualifiedName: 'account.introspect',
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const newMcpServer = async ({
new McpServer(
{
name: 'tryfinch_finch_api_api',
version: '9.9.0',
version: '9.10.0',
},
{
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
Expand Down
10 changes: 9 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ import * as Uploads from './core/uploads';
import * as API from './resources/index';
import { APIPromise } from './core/api-promise';
import { AccessTokenCreateParams, AccessTokens, CreateAccessTokenResponse } from './resources/access-tokens';
import { Account, DisconnectResponse, Introspection } from './resources/account';
import {
Account,
AccountDisconnectEntityParams,
DisconnectEntityResponse,
DisconnectResponse,
Introspection,
} from './resources/account';
import {
Provider,
ProviderListResponse,
Expand Down Expand Up @@ -967,8 +973,10 @@ export declare namespace Finch {

export {
Account as Account,
type DisconnectEntityResponse as DisconnectEntityResponse,
type DisconnectResponse as DisconnectResponse,
type Introspection as Introspection,
type AccountDisconnectEntityParams as AccountDisconnectEntityParams,
};

export {
Expand Down
54 changes: 53 additions & 1 deletion src/resources/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,59 @@ import { RequestOptions } from '../internal/request-options';
export class Account extends APIResource {
/**
* Disconnect one or more `access_token`s from your application.
*
* @example
* ```ts
* const disconnectResponse =
* await client.account.disconnect();
* ```
*/
disconnect(options?: RequestOptions): APIPromise<DisconnectResponse> {
return this._client.post('/disconnect', { ...options, __security: { bearerAuth: true } });
}

/**
* Disconnect entity(s) from a connection without affecting other entities
* associated with the same connection.
*
* @example
* ```ts
* const disconnectEntityResponse =
* await client.account.disconnectEntity({
* entity_ids: [
* '3c90c3cc-0d44-4b50-8888-8dd25736052a',
* '5e6f7a8b-9c10-4d11-a12b-c13d14e15f16',
* ],
* });
* ```
*/
disconnectEntity(
body: AccountDisconnectEntityParams,
options?: RequestOptions,
): APIPromise<DisconnectEntityResponse> {
return this._client.post('/disconnect-entity', { body, ...options, __security: { bearerAuth: true } });
}

/**
* Read account information associated with an `access_token`
*
* @example
* ```ts
* const introspection = await client.account.introspect();
* ```
*/
introspect(options?: RequestOptions): APIPromise<Introspection> {
return this._client.get('/introspect', { ...options, __security: { bearerAuth: true } });
}
}

export interface DisconnectEntityResponse {
/**
* If the request is successful, Finch will return "success" (HTTP 200 status).
*/
status: string;
}

export interface DisconnectResponse {
/**
* If the request is successful, Finch will return "success" (HTTP 200 status).
Expand Down Expand Up @@ -195,6 +235,18 @@ export namespace Introspection {
}
}

export interface AccountDisconnectEntityParams {
/**
* Array of entity UUIDs to disconnect. At least one entity ID must be provided.
*/
entity_ids: Array<string>;
}

export declare namespace Account {
export { type DisconnectResponse as DisconnectResponse, type Introspection as Introspection };
export {
type DisconnectEntityResponse as DisconnectEntityResponse,
type DisconnectResponse as DisconnectResponse,
type Introspection as Introspection,
type AccountDisconnectEntityParams as AccountDisconnectEntityParams,
};
}
Loading
Loading