Skip to content
Open
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 .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write

steps:
- uses: actions/checkout@v6
Expand All @@ -41,7 +42,6 @@ jobs:
yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
env:
INPUT_PATH: ${{ github.event.inputs.path }}
NPM_TOKEN: ${{ secrets.FINCH_NPM_TOKEN || secrets.NPM_TOKEN }}

- name: Upload MCP Server DXT GitHub release asset
run: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ jobs:
- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.FINCH_NPM_TOKEN || secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dist-deno
.eslintcache
dist-bundle
*.mcpb
oidc
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.7.0"
".": "9.8.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-326626d329d2a34acc127d7afe18edb068b1c28a8b50fecb4bb9973d3f9337a4.yml
openapi_spec_hash: 7559424a86d6c7768cee9c650d0c156c
config_hash: d21a244fc073152c8dbecb8ece970209
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-c8a0d5eca390ea3ab6e8b5b7d9b46d9a22e34d81aeab444c8ce1b5a94eba0028.yml
openapi_spec_hash: e261a3289242d3ad52542f1491a903ee
config_hash: 429708b67ee9e80003db82611677296c
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 9.8.0 (2026-05-07)

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

### Features

* **api:** api update ([d7d9819](https://github.com/Finch-API/finch-api-node/commit/d7d9819bda80e1c61335163a151d836b4d743551))
* **api:** change auth to npm to oidc ([04f1246](https://github.com/Finch-API/finch-api-node/commit/04f1246dd787aec10cf13f78ad1ab910a234ebf6))


### Chores

* redact api-key headers in debug logs ([b1b7308](https://github.com/Finch-API/finch-api-node/commit/b1b7308927f0ad5e2ce0b2b50e2f37bdb8f430df))


### Documentation

* clarify forwards compat behavior ([d055d7d](https://github.com/Finch-API/finch-api-node/commit/d055d7daad62c8de922201b4a009f1babc488716))
* update logging docs ([f3c8c59](https://github.com/Finch-API/finch-api-node/commit/f3c8c591d0514b08c3336979a96afb6fc9862bbc))
* update with proxy auth info ([da2dfc8](https://github.com/Finch-API/finch-api-node/commit/da2dfc828d54bf3c734df9c96b6fe111d2e4f32b))

## 9.7.0 (2026-04-30)

Full Changelog: [v9.6.0...v9.7.0](https://github.com/Finch-API/finch-api-node/compare/v9.6.0...v9.7.0)
Expand Down
4 changes: 0 additions & 4 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

errors=()

if [ -z "${NPM_TOKEN}" ]; then
errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

lenErrors=${#errors[@]}

if [[ lenErrors -gt 0 ]]; then
Expand Down
13 changes: 11 additions & 2 deletions bin/publish-npm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

set -eux

npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
if [[ ${NPM_TOKEN:-} ]]; then
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
elif [[ ! ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-} ]]; then
echo "ERROR: NPM_TOKEN must be set if not running in a Github Action with id-token permission"
exit 1
fi

yarn build
cd dist
Expand Down Expand Up @@ -57,5 +62,9 @@ else
TAG="latest"
fi

# Install OIDC compatible npm version
npm install --prefix ../oidc/ npm@11.6.2

# Publish with the appropriate tag
yarn publish --tag "$TAG"
export npm_config_registry='https://registry.npmjs.org'
../oidc/node_modules/.bin/npm publish --tag "$TAG"
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.7.0",
"version": "9.8.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.7.0",
"version": "9.8.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.7.0",
"version": "9.8.0",
"description": "The official MCP Server for the Finch API",
"author": "Finch <founders@tryfinch.com>",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp-server/src/local-docs-search.ts

Large diffs are not rendered by default.

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.7.0',
version: '9.8.0',
},
{
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
Expand Down
2 changes: 2 additions & 0 deletions src/internal/utils/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export const formatRequestDetails = (details: {
name,
(
name.toLowerCase() === 'authorization' ||
name.toLowerCase() === 'api-key' ||
name.toLowerCase() === 'x-api-key' ||
name.toLowerCase() === 'cookie' ||
name.toLowerCase() === 'set-cookie'
) ?
Expand Down
16 changes: 8 additions & 8 deletions src/resources/hris/benefits/benefits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ export type CompanyBenefitsSinglePage = SinglePage<CompanyBenefit>;
export type SupportedBenefitsSinglePage = SinglePage<SupportedBenefit>;

export type BenefitContribution =
| BenefitContribution.UnionMember0
| BenefitContribution.UnionMember1
| BenefitContribution.UnionMember2;
| BenefitContribution.BenefitContributionFixed
| BenefitContribution.BenefitContributionPercent
| BenefitContribution.BenefitContributionTiered;

export namespace BenefitContribution {
export interface UnionMember0 {
export interface BenefitContributionFixed {
/**
* Contribution amount in cents.
*/
Expand All @@ -158,7 +158,7 @@ export namespace BenefitContribution {
type: 'fixed';
}

export interface UnionMember1 {
export interface BenefitContributionPercent {
/**
* Contribution amount in basis points (1/100th of a percent).
*/
Expand All @@ -170,20 +170,20 @@ export namespace BenefitContribution {
type: 'percent';
}

export interface UnionMember2 {
export interface BenefitContributionTiered {
/**
* Array of tier objects defining employer match tiers based on employee
* contribution thresholds.
*/
tiers: Array<UnionMember2.Tier>;
tiers: Array<BenefitContributionTiered.Tier>;

/**
* Tiered contribution type (only valid for company_contribution).
*/
type: 'tiered';
}

export namespace UnionMember2 {
export namespace BenefitContributionTiered {
export interface Tier {
match: number;

Expand Down
31 changes: 17 additions & 14 deletions src/resources/hris/benefits/individuals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ export interface EnrolledIndividualBenefitResponse {
}

export interface IndividualBenefit {
body: IndividualBenefit.UnionMember0 | IndividualBenefit.BatchError;
body: IndividualBenefit.IndividualBenefit | IndividualBenefit.BatchError;

code: number;

individual_id: string;
}

export namespace IndividualBenefit {
export interface UnionMember0 {
export interface IndividualBenefit {
/**
* If the benefit supports annual maximum, the amount in cents for this individual.
*/
Expand All @@ -142,25 +142,28 @@ export namespace IndividualBenefit {
* matching structures.
*/
company_contribution:
| UnionMember0.UnionMember0
| UnionMember0.UnionMember1
| UnionMember0.UnionMember2
| IndividualBenefit.CompanyContributionFixed
| IndividualBenefit.CompanyContributionPercent
| IndividualBenefit.CompanyContributionTiered
| null;

/**
* Employee deduction configuration. Supports both fixed amounts (in cents) and
* percentage-based contributions (in basis points where 100 = 1%).
*/
employee_deduction: UnionMember0.UnionMember0 | UnionMember0.UnionMember1 | null;
employee_deduction:
| IndividualBenefit.EmployeeDeductionContributionFixed
| IndividualBenefit.EmployeeDeductionContributionPercent
| null;

/**
* Type for HSA contribution limit if the benefit is a HSA.
*/
hsa_contribution_limit?: 'individual' | 'family' | null;
}

export namespace UnionMember0 {
export interface UnionMember0 {
export namespace IndividualBenefit {
export interface CompanyContributionFixed {
/**
* Contribution amount in cents (for type=fixed) or basis points (for type=percent,
* where 100 = 1%). Not used for type=tiered.
Expand All @@ -174,7 +177,7 @@ export namespace IndividualBenefit {
type: 'fixed';
}

export interface UnionMember1 {
export interface CompanyContributionPercent {
/**
* Contribution amount in cents (for type=fixed) or basis points (for type=percent,
* where 100 = 1%). Not used for type=tiered.
Expand All @@ -188,12 +191,12 @@ export namespace IndividualBenefit {
type: 'percent';
}

export interface UnionMember2 {
export interface CompanyContributionTiered {
/**
* Array of tier objects defining employer match tiers based on employee
* contribution thresholds. Required when type=tiered.
*/
tiers: Array<UnionMember2.Tier>;
tiers: Array<CompanyContributionTiered.Tier>;

/**
* Contribution type. Supported values: "fixed" (amount in cents), "percent"
Expand All @@ -202,15 +205,15 @@ export namespace IndividualBenefit {
type: 'tiered';
}

export namespace UnionMember2 {
export namespace CompanyContributionTiered {
export interface Tier {
match: number;

threshold: number;
}
}

export interface UnionMember0 {
export interface EmployeeDeductionContributionFixed {
/**
* Contribution amount in cents (for type=fixed) or basis points (for type=percent,
* where 100 = 1%).
Expand All @@ -224,7 +227,7 @@ export namespace IndividualBenefit {
type: 'fixed';
}

export interface UnionMember1 {
export interface EmployeeDeductionContributionPercent {
/**
* Contribution amount in cents (for type=fixed) or basis points (for type=percent,
* where 100 = 1%).
Expand Down
14 changes: 7 additions & 7 deletions src/resources/hris/employments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export class Employments extends APIResource {

export type EmploymentDataResponsesPage = ResponsesPage<EmploymentDataResponse>;

export type EmploymentData = EmploymentData.UnionMember0 | EmploymentData.BatchError;
export type EmploymentData = EmploymentData.EmploymentData | EmploymentData.BatchError;

export namespace EmploymentData {
export interface UnionMember0 {
export interface EmploymentData {
/**
* A stable Finch `id` (UUID v4) for an individual in the company.
*/
Expand All @@ -53,12 +53,12 @@ export namespace EmploymentData {
/**
* The department object.
*/
department: UnionMember0.Department | null;
department: EmploymentData.Department | null;

/**
* The employment object.
*/
employment: UnionMember0.Employment | null;
employment: EmploymentData.Employment | null;

/**
* The detailed employment status of the individual.
Expand Down Expand Up @@ -103,7 +103,7 @@ export namespace EmploymentData {
/**
* The manager object representing the manager of the individual within the org.
*/
manager: UnionMember0.Manager | null;
manager: EmploymentData.Manager | null;

/**
* The legal middle name of the individual.
Expand All @@ -122,7 +122,7 @@ export namespace EmploymentData {
* employer in the system. Custom fields are not currently supported for assisted
* connections.
*/
custom_fields?: Array<UnionMember0.CustomField> | null;
custom_fields?: Array<EmploymentData.CustomField> | null;

/**
* The employee's income as reported by the provider. This may not always be
Expand All @@ -147,7 +147,7 @@ export namespace EmploymentData {
work_id?: string | null;
}

export namespace UnionMember0 {
export namespace EmploymentData {
/**
* The department object.
*/
Expand Down
10 changes: 5 additions & 5 deletions src/resources/hris/individuals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export class Individuals extends APIResource {

export type IndividualResponsesPage = ResponsesPage<IndividualResponse>;

export type Individual = Individual.UnionMember0 | Individual.BatchError;
export type Individual = Individual.Individual | Individual.BatchError;

export namespace Individual {
export interface UnionMember0 {
export interface Individual {
/**
* A stable Finch `id` (UUID v4) for an individual in the company.
*/
Expand Down Expand Up @@ -79,7 +79,7 @@ export namespace Individual {
*/
middle_name: string | null;

phone_numbers: Array<UnionMember0.PhoneNumber | null> | null;
phone_numbers: Array<Individual.PhoneNumber | null> | null;

/**
* The preferred name of the individual.
Expand All @@ -88,7 +88,7 @@ export namespace Individual {

residence: HRISAPI.Location | null;

emails?: Array<UnionMember0.Email> | null;
emails?: Array<Individual.Email> | null;

/**
* Social Security Number of the individual in **encrypted** format. This field is
Expand All @@ -106,7 +106,7 @@ export namespace Individual {
ssn?: string | null;
}

export namespace UnionMember0 {
export namespace Individual {
export interface PhoneNumber {
data: string | null;

Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '9.7.0'; // x-release-please-version
export const VERSION = '9.8.0'; // x-release-please-version
Loading