Skip to content

Commit fa95a39

Browse files
feat(api): manual updates
1 parent cd10c0f commit fa95a39

File tree

10 files changed

+27
-27
lines changed

10 files changed

+27
-27
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-640ec74bfc2f335f7277863ee0cbd0af98bb6018cb1ec2f116ce4145148f4477.yml
33
openapi_spec_hash: 315e7859c3f77311261fb824b74a8247
4-
config_hash: f921f92cc97449dcc1334a594b435c73
4+
config_hash: 0892e2e0eeb0343a022afa62e9080dd1

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,10 @@ Methods:
373373

374374
Types:
375375

376-
- <code><a href="./src/resources/connect/sessions.ts">SessionConnectResponse</a></code>
376+
- <code><a href="./src/resources/connect/sessions.ts">SessionNewResponse</a></code>
377377
- <code><a href="./src/resources/connect/sessions.ts">SessionReauthenticateResponse</a></code>
378378

379379
Methods:
380380

381-
- <code title="post /connect/sessions">client.connect.sessions.<a href="./src/resources/connect/sessions.ts">connect</a>({ ...params }) -> SessionConnectResponse</code>
381+
- <code title="post /connect/sessions">client.connect.sessions.<a href="./src/resources/connect/sessions.ts">new</a>({ ...params }) -> SessionNewResponse</code>
382382
- <code title="post /connect/sessions/reauthenticate">client.connect.sessions.<a href="./src/resources/connect/sessions.ts">reauthenticate</a>({ ...params }) -> SessionReauthenticateResponse</code>

packages/mcp-server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,5 +392,5 @@ The following tools are available in this MCP server.
392392

393393
### Resource `connect.sessions`:
394394

395-
- `connect_connect_sessions` (`write`): Create a new connect session for an employer
395+
- `new_connect_sessions` (`write`): Create a new connect session for an employer
396396
- `reauthenticate_connect_sessions` (`write`): Create a new Connect session for reauthenticating an existing connection

packages/mcp-server/src/code-tool-worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const fuse = new Fuse(
8787
'client.sandbox.jobs.configuration.update',
8888
'client.payroll.payGroups.list',
8989
'client.payroll.payGroups.retrieve',
90-
'client.connect.sessions.connect',
90+
'client.connect.sessions.new',
9191
'client.connect.sessions.reauthenticate',
9292
],
9393
{ threshold: 1, shouldSort: true },

packages/mcp-server/src/tools/connect/sessions/connect-connect-sessions.ts renamed to packages/mcp-server/src/tools/connect/sessions/new-connect-sessions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export const metadata: Metadata = {
1616
};
1717

1818
export const tool: Tool = {
19-
name: 'connect_connect_sessions',
19+
name: 'new_connect_sessions',
2020
description:
21-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new connect session for an employer\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session_connect_response',\n $defs: {\n session_connect_response: {\n type: 'object',\n properties: {\n connect_url: {\n type: 'string',\n description: 'The Connect URL to redirect the user to for authentication'\n },\n session_id: {\n type: 'string',\n description: 'The unique identifier for the created connect session'\n }\n },\n required: [ 'connect_url',\n 'session_id'\n ]\n }\n }\n}\n```",
21+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new connect session for an employer\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session_new_response',\n $defs: {\n session_new_response: {\n type: 'object',\n properties: {\n connect_url: {\n type: 'string',\n description: 'The Connect URL to redirect the user to for authentication'\n },\n session_id: {\n type: 'string',\n description: 'The unique identifier for the created connect session'\n }\n },\n required: [ 'connect_url',\n 'session_id'\n ]\n }\n }\n}\n```",
2222
inputSchema: {
2323
type: 'object',
2424
properties: {
@@ -103,7 +103,7 @@ export const tool: Tool = {
103103
export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
104104
const { jq_filter, ...body } = args as any;
105105
try {
106-
return asTextContentResult(await maybeFilter(jq_filter, await client.connect.sessions.connect(body)));
106+
return asTextContentResult(await maybeFilter(jq_filter, await client.connect.sessions.new(body)));
107107
} catch (error) {
108108
if (isJqError(error)) {
109109
return asErrorResult(error.message);

packages/mcp-server/src/tools/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import retrieve_jobs_sandbox_configuration from './sandbox/jobs/configuration/re
4848
import update_jobs_sandbox_configuration from './sandbox/jobs/configuration/update-jobs-sandbox-configuration';
4949
import retrieve_payroll_pay_groups from './payroll/pay-groups/retrieve-payroll-pay-groups';
5050
import list_payroll_pay_groups from './payroll/pay-groups/list-payroll-pay-groups';
51-
import connect_connect_sessions from './connect/sessions/connect-connect-sessions';
51+
import new_connect_sessions from './connect/sessions/new-connect-sessions';
5252
import reauthenticate_connect_sessions from './connect/sessions/reauthenticate-connect-sessions';
5353

5454
export const endpoints: Endpoint[] = [];
@@ -101,7 +101,7 @@ addEndpoint(retrieve_jobs_sandbox_configuration);
101101
addEndpoint(update_jobs_sandbox_configuration);
102102
addEndpoint(retrieve_payroll_pay_groups);
103103
addEndpoint(list_payroll_pay_groups);
104-
addEndpoint(connect_connect_sessions);
104+
addEndpoint(new_connect_sessions);
105105
addEndpoint(reauthenticate_connect_sessions);
106106

107107
export type Filter = {

src/resources/connect/connect.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import { APIResource } from '../../core/resource';
44
import * as SessionsAPI from './sessions';
55
import {
6-
SessionConnectParams,
7-
SessionConnectResponse,
6+
SessionNewParams,
7+
SessionNewResponse,
88
SessionReauthenticateParams,
99
SessionReauthenticateResponse,
1010
Sessions,
@@ -19,9 +19,9 @@ Connect.Sessions = Sessions;
1919
export declare namespace Connect {
2020
export {
2121
Sessions as Sessions,
22-
type SessionConnectResponse as SessionConnectResponse,
22+
type SessionNewResponse as SessionNewResponse,
2323
type SessionReauthenticateResponse as SessionReauthenticateResponse,
24-
type SessionConnectParams as SessionConnectParams,
24+
type SessionNewParams as SessionNewParams,
2525
type SessionReauthenticateParams as SessionReauthenticateParams,
2626
};
2727
}

src/resources/connect/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
export { Connect } from './connect';
44
export {
55
Sessions,
6-
type SessionConnectResponse,
6+
type SessionNewResponse,
77
type SessionReauthenticateResponse,
8-
type SessionConnectParams,
8+
type SessionNewParams,
99
type SessionReauthenticateParams,
1010
} from './sessions';

src/resources/connect/sessions.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class Sessions extends APIResource {
88
/**
99
* Create a new connect session for an employer
1010
*/
11-
connect(body: SessionConnectParams, options?: RequestOptions): APIPromise<SessionConnectResponse> {
11+
new(body: SessionNewParams, options?: RequestOptions): APIPromise<SessionNewResponse> {
1212
return this._client.post('/connect/sessions', { body, ...options });
1313
}
1414

@@ -23,7 +23,7 @@ export class Sessions extends APIResource {
2323
}
2424
}
2525

26-
export interface SessionConnectResponse {
26+
export interface SessionNewResponse {
2727
/**
2828
* The Connect URL to redirect the user to for authentication
2929
*/
@@ -47,7 +47,7 @@ export interface SessionReauthenticateResponse {
4747
session_id: string;
4848
}
4949

50-
export interface SessionConnectParams {
50+
export interface SessionNewParams {
5151
/**
5252
* Unique identifier for the customer
5353
*/
@@ -82,7 +82,7 @@ export interface SessionConnectParams {
8282
/**
8383
* Integration configuration for the connect session
8484
*/
85-
integration?: SessionConnectParams.Integration | null;
85+
integration?: SessionNewParams.Integration | null;
8686

8787
/**
8888
* Enable manual authentication mode
@@ -106,7 +106,7 @@ export interface SessionConnectParams {
106106
sandbox?: 'finch' | 'provider' | null;
107107
}
108108

109-
export namespace SessionConnectParams {
109+
export namespace SessionNewParams {
110110
/**
111111
* Integration configuration for the connect session
112112
*/
@@ -159,9 +159,9 @@ export interface SessionReauthenticateParams {
159159

160160
export declare namespace Sessions {
161161
export {
162-
type SessionConnectResponse as SessionConnectResponse,
162+
type SessionNewResponse as SessionNewResponse,
163163
type SessionReauthenticateResponse as SessionReauthenticateResponse,
164-
type SessionConnectParams as SessionConnectParams,
164+
type SessionNewParams as SessionNewParams,
165165
type SessionReauthenticateParams as SessionReauthenticateParams,
166166
};
167167
}

tests/api-resources/connect/sessions.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const client = new Finch({
99

1010
describe('resource sessions', () => {
1111
// prism tests are broken
12-
test.skip('connect: only required params', async () => {
13-
const responsePromise = client.connect.sessions.connect({
12+
test.skip('new: only required params', async () => {
13+
const responsePromise = client.connect.sessions.new({
1414
customer_id: 'x',
1515
customer_name: 'x',
1616
products: ['benefits'],
@@ -25,8 +25,8 @@ describe('resource sessions', () => {
2525
});
2626

2727
// prism tests are broken
28-
test.skip('connect: required and optional params', async () => {
29-
const response = await client.connect.sessions.connect({
28+
test.skip('new: required and optional params', async () => {
29+
const response = await client.connect.sessions.new({
3030
customer_id: 'x',
3131
customer_name: 'x',
3232
products: ['benefits'],

0 commit comments

Comments
 (0)